This thread is resolved. Here is a description of the problem and solution.
Problem: The client has a custom post type called Recipes. After duplicating and translating these posts using WP All Import, updating the original English Recipes also reverted the translations back to English. This issue likely arose because the posts were duplicated instead of being set to translate independently. Solution: To prevent this issue, it's recommended to set posts to be translated independently, so updates to the original language don't affect the translations. Unfortunately, there's no option to change all posts to 'translated independently' at once; this adjustment needs to be made in the database. You can use a tool like phpMyAdmin to access your database. In the
wp_postmeta
table, you should delete the key
_icl_lang_duplicate_of
for the duplicated posts. This action can be performed in bulk with the correct SQL query. However, directly modifying the database can be risky. Ensure you have a full backup before proceeding.
For more details on translating sites built with ACF, you can visit this link.
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.
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.
Hello,
I have practical question. We have custom post type called Recipes. We duplicated all Recipes and then imported other language text with WP All Import, So far so good, everything was translated and okay. Recently I needed to update some of the original English Recipes by WP All Import and it changed the translation back to English too. I guess it is because we duplicated (as we were recommended during onboarding meeting) the posts instead of translate. What is the best practise here when we will time by time need to update posts in original language? How should we do it to avoid repeating the situation when after update of those posts we have other languages back in English?
If you have duplicated posts earlier, they may have the duplicate status. You need to ensure they do not have this status before updating the original language post or importing translations.
thank you for your answer. Unfortunately I'm still not sure how to do it.
There are thousands of entries and we have taxonomies in ACF fields that should be same for all languages. It seems they are not copied to second language if it is translated independently. Is it right?
And is there way how to switch to "translated independently" all posts at once so we don't have to open one by one?
Option 2) is for you or someone with knowledge of working with the database. You need to access your database using a tool like phpMyAdmin, and in the wp_postmeta database table, delete the key _icl_lang_duplicate_of for the duplicated posts. This can be done at once with the correct SQL query. If the entry _icl_lang_duplicate_of is deleted, the translated post is no longer in sync.
Please keep in mind that deleting something in the database is not recommended and is risky. You need to make sure to have a full backup before making any changes.
I understand.
I have consequent question. I found out that those recipes have their _wpml_import_language_code changed to default language - meaning it was sk for (Slovak) and now it is en as default English. This happened with other custom post type too and I don't know why because that one was not imported. Few days ago I created new entries, duplicated them and exported with correct _wpml_import_language_code "sk". So it worked.
Also those taxonomies do not work properly. I imported taxonomies to default language but second language does not show them (when they should be seen on front end) as if they were empty.
Any idea why is that happening?
If we use Translate instead of Duplicate, would it automatically update taxonomies too if we update default language?
If I wanted to do the Recipes as Translate, do I have to delete all those duplicates first or can I use them and just change to translations (not independent one)?
When you translate a post that has taxonomies, the translated taxonomy should automatically be assigned to the translated post, and it will stay synchronized. This means that if you change the taxonomy for the default language post, it should also change for the translated post.
I think both options are good. I suggest you test and see which one is better for you, whether to delete the duplicate or just change it to translations.
If you still have a problem with the subsequent question, I recommend you open a new support ticket. Provide detailed information and share a working example so the support team member can check it further.