Hi WPML friends,
I'm building a smal site in 5 languages for a client of mine and just before going live, they ask me to change the slugs of a custom post type.
No problem, but after changing the slug, 4of the 5 language versions of these posts disappear.
I jumped back to a backup version, but before trying it again, I would like to ask you for help!
Thanks in advance!
Bye
Ward
Thank you for contacting WPML support. I'd be happy to assist you on this issue.
After changing the CPT, could you please go to WPML-> Support ->Troubleshooting and click the below buttons:
+ Clear Cache in WPML
+ Set Language information
+ Fix element types collation
+ Remove ghost entries from the translation tables
+ Assign translation status to duplicated content
Does this help? if not, to debug this issue further, I would need to check your site settings once, for this I would need temporary access (wp-admin and ftp) to your site.
So could you please provide me with those details, you will find the needed fields for this below the comment area when you log in to leave your next reply. hidden link
Strange thing; the updates on this ticket do not reach me through email. But the questions if the ticket is solved do!
The way I go about it is:
Change the translation setting of the post type "prodcut group" to translatable and even translate the slugs there.
Click CPT UI >> Add/Edit post types >> Edit post types and choose "product-group".
There I change the Post Type Slug, Plural Label and Singular Label, while toggling ON "Migrate posts to newly renamed post type".
This results in the 4 posts, formarly known as Product Groups, to get changed to post types with the new name, but only the 4 posts in the primary language ( english ). the versions in Dutch, German, French and Spanish are gone!
Regarding the notifications, could you please go to the Notifications tab on the right side of this forum (bell icon) and enable them?
I can see the issue, and it looks like the migration done by the CPT plugin does not migrate the translations. Unfortunately, making this work would require significant work.
WPML maps translations based on the post ID and post type. In your case, the post type slug has changed, so WPML treats it as a completely new post type, and the previous translation mapping no longer applies.
You can try the following alternatives instead:
* Migrate all posts before changing the slugs, then import them after the change
* If you used the WPML Advanced Translation Editor, you can open the translations again and the previous translated content should still be available, so you would only need to save them again.
Hi Shekhar,
Thanks! I can't find the bell icon or notifications, but I'll keep looking.
About the translations; I think the easiest way will be to to copy the texts of the 4 posts in all languages, dump them , change the slug and start over.
That will take less time and less risk I think.
I'll keep you posted.
Bye
Ward