This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 7 replies, has 2 voices.

Last updated by Andreas W. 3 months, 2 weeks ago.

Assigned support staff: Andreas W..

Author Posts
June 12, 2019 at 2:54 pm

marliesD

I am trying to:

The same as in this post: https://wpml.org/forums/topic/cpt-ui-changing-slug-lead-to-loose-translated-posts/

I use CPT UI te create custom post types. One of the post types should get a new slug. When I change the slug, all I am left with are the English versions of these posts.

Link to a page where the issue can be seen:
hidden link

June 13, 2019 at 2:15 am #4008391

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for contacting the WPML Support Forum.

Once a slug has been changed you will need to update the translations.

I can see that hidden link is currenlty requesting translation updates for German and French. The Dutch version is not translated yet. Anyhow, the pages show up as translated, which for I am not quiet understanding your request.

In case you wish to change the slug for the whole post type (Example "Services") you will need to go to WPML -> Settings -> Post Types Translation and click the option "Set different slugs in different languages for Services" right beneath the post type "Services".

Could you please give me some detailed steps in order to recreate the issue?

Kind regards
Andreas

June 13, 2019 at 8:59 am #4010849

marliesD

Thank you for your quick response. What I do:
* In CPT UI (hidden link) I change the slug for the services post type to surveys and check 'Migrate posts to newly renamed post type?'
* When I then go to the all services page (hidden link) all that is left are the English posts, the 40 other in French and German are gone and so are the translation options.
* Then I go to the WPML settings page (hidden link) and check 'Translatable - only show translated items' for the surveys post type.
* Now when I return to hidden link the translation options are there, but German and French are gone.

Dutch is only there because some of the original content from the old website was in Dutch. But that will be removed after reviewing this content.

=====
I also tried to go into the WPML settings and change the slugs there, but I cannot change the (original) slug in English.

June 13, 2019 at 8:54 pm #4016893

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

I need a little more information in order to assist you with the issue.

I am sorry, but somehow I am not understanding why you say German and French are gone.

There are 20 Service Posts and the most of them do have English and French translations. Only after changing the custom post slug it would be necessary to retranslate, as the permalink changed.
There are 18 posts with arrow circle symbols for posts in German and French. This symbol mean that the translation needs an update. On the other hand the Dutch language does not have any posts.

Did the Dutch section have posts before changing the custom post slug?

If so, would you say that the option from Custom Post Types UI to migrate posts only when changing the post slug will include only posts in default language (English)?

I can see a not on the option that warns not to edit, as the function will create a new post type. I case it was the issue that translations really got lost when using the option pelase let me know and we will need to investigate further.

Kind regards
Andreas

June 18, 2019 at 11:12 am #4043069

marliesD

Andreas,

What you are seeing is the original state, so before changing the slug. Don't worry about Dutch, that is only there for historical reasons and will probably be deleted when everything is checked.

What I want to achieve:
I want to change the slug from 'services' to 'surveys' and keep all of the content and translations intact. But as soon as I do this (via CPT UI) the German and French content disappears.

Please try it yourself. I have a backup available so don't worry about messing up.

When changing the slug in CPT UI there is checkbox you have to check to migrate the content to the new slug. But only English seems to get migrated.

June 18, 2019 at 11:14 am #4043075

marliesD

Please take a look at https://wpml.org/forums/topic/cpt-ui-changing-slug-lead-to-loose-translated-posts/
I'm not sure if this eventually got solved, but it's the same issue.

June 18, 2019 at 9:13 pm #4046457

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Thank you for your message.

I understand. I have recreated the issue on a new installation and I am consulting our second Tier Support in order to get more information about in how far we could find a solution for the issue.

Somehow, this issue is more related to CTP UI than to WPML but if our developers find a way to handle the post types migration when the slug changes we will be able to work together with the CPT UI plugin author's to find a solution.

I will get back to you as soon i receive feedback from our Tier 2 Support.

Kind regards
Andreas

June 29, 2019 at 12:08 am #4110329

Andreas W.
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

Timezone: America/Lima (GMT-05:00)

Hello,

Our second tier provided a workaround for the issue with CPT UI.

The Problem is that only current language posts are migrated not all. So the translated posts still exist in the old post type slug.

Before changing the custom post type slug please disable WPML. Then change the slug and migrate the posts. If you check now the new post type all old custopm post types will be included. Now reactivate WPML.

Now the problem is they may be not connected this is because we run the troubleshooting options at WPML -> Support -> Troubleshooting. In cases were these options will not solve the issue the post types might only need to be retranslated manually, which means that you only need to apply the translation again.

You can see an example on this test site. The custom post type Portfolio has been changed to Gallery.

One Click Login: hidden link

Kind regards
Andreas