Home›Support›English Support›[Resolved] Products duplicate on secondary language and lost translation asignment
[Resolved] Products duplicate on secondary language and lost translation asignment
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing an issue with WooCommerce products in WPML where some products are duplicated in the secondary language. Some duplicates have the same URL, while others have a '-2' suffix. All problematic products have lost their translation connection with the default language. Solution: We recommend the following steps to address the issue: 1. Use the 'Set Language Information' option in WPML > Support > Troubleshooting Link to correct products/posts/pages that have been assigned to the wrong language. It's crucial to create a backup before performing this step. 2. If duplicates persist, follow the steps to disconnect and reconnect translations: - Disconnect the translation using the guide at How to Disconnect Translations - Reconnect the translations as per the instructions at How to Link Already Translated Pages - Manually delete the duplicated product. 3. If the issue is related to images not copying over, resave the primary language product and trigger the translation again.
Please note that these solutions might become irrelevant due to updates or specific site configurations. If these steps do not resolve your issue, or if you encounter different symptoms, 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 the problem persists, 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.
<b>Background of the issue: </b>
I am trying to resolve an issue with WooCommerce products in WPML. We found a bug where some products are duplicated in the secondary language. Some duplicates have the same URL, while others have a '-2' at the end. Here are the screenshots for the same URL products: hidden link, hidden link, hidden link. And here for different URL products: hidden link (this says it is a Greek product, but I can see it in the English category page), hidden link. Additionally, all products have lost their connection with the default language product.
<b>Symptoms: </b>
Products are duplicated in the secondary language, with some having the same URL and others having a '-2' suffix. All of the problematic products have lost their translation connection with the default language.
<b>Questions: </b>
Why are products duplicated in the secondary language?
Why have products lost their translation connection with the default language?
I can see the issue from your screenshots. It is not possible to have both same URL slugs. I need to check what's going on. I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
Thanks for getting back to me. I've logged in and noticed you have over 1600 products, so it would be quite cumbersome for me to check each one individually. Could you please provide a list of a few products that are experiencing duplicate issues?
I've checked and noticed something strange here. When I edit this product hidden link , it goes to the Greek language.
Do you have a staging site for this? I need to perform some troubleshooting steps in WPML > Support > Troubleshooting and WCML > Status > Troubleshooting link.
Performing both troubleshooting options mentioned above might break the site.
Thank you for your response. These options will review the WPML tables to ensure that products are correctly assigned to their respective languages. This is essential because some products appear in the correct language on the frontend, but in the backend, they are being edited in a different language. This also indicates potential issues with the server database.
Given the size of your site, some troubleshooting steps may take time, and if anything goes wrong, restoring the site without a backup could be extremely challenging.
Because we are only facing the problem in the live site and at the moment we can not create a stagging site we would like to ask if it is possible to arange a meeting in order to syncronize our actions.
In order for us to make a backup and you to run the troubleshooting at the same time. I do not know if this is possible or it is out of your policies, but our working time is Monday - Friday 09:00 - 17:00 Greece Time (GMT+2).
We think that we have found the source of the problem. We are using YITH Bulk Edit plugin and our customer filtered the products she wanted in tables of 20 products per table and then opened each table in a different browser tab and clicked update. After making the updates in the default language she made the same actions in the secondary one.
I do not know if you can make out anything of this. If you are not allowed to get in a meeting call I would like you to tell me exactly what I need to do in order to run the actions you are reffering to.
Unfortunately, we only offer support via live chat or ticketing. However, you mentioned, "After making the updates in the default language, she repeated the same actions in the secondary one." Are you saying that this method resolved the issue?
If so, please try applying the same approach to another product where you're experiencing the issue.
The troubleshooting step I’d like to implement is called "Set Language Information" in WPML > Support > Troubleshooting Link. This option is designed to correct products/posts/pages that have been assigned to the wrong language. I'm not certain if this will fully resolve the issue, which is why I recommend creating a backup beforehand. If anything goes wrong, you can simply restore the backup.
We tried the "Set Language Information", thankfully it did not break the site, but it also did not fix the problem.
As you can understand the second option is not optional. The products are a lot and for security reasons we will have to do this in all the products.
While trying to find a solution I came up to this hidden link. This is a product that is translated, in the backend and the database there is only one translation, in the frontend I see two products with the same URL and in the WPML -> Translation Management I see the screenshot above. Why is this happening?
We found the problem. The products that are having the problem are duplicated in the default language. For a reason the duplicates are showen in the frontend in the English version (secondary language). Also the product I am reffering to have lost their connection with the translation.
I have tried to follow the steps you provide in order to connect again with the translation. In the secondary language I can not see the "Connect with translations" link hidden link.
Also when I am trying to assign the translation from the default language I get for a reasson a product variation in the default language hidden link. Why is the variation there? How can I link a product (not a page) to the translation? Step by step.
Looks like you've multiple replies and I will try to answer your questions accordingly.
1. While trying to find a solution I came up to this hidden link. This is a product that is translated, in the backend and the database there is only one translation, in the frontend I see two products with the same URL and in the WPML -> Translation Management I see the screenshot above. Why is this happening? You mentioned that there are two products with the same URL, please edit both and only delete the one without translation. I'm not sure why this is happening, and did you make any adjustments to the product manually on the translated version?
2. There are also some private products created that appear in the frontend. These products have no image but they appear with one in the frontend. This usually happens when the Advanced Translation Editor fails to copy the primary images to the translated version. Please go to the primary language product and resave it, then, trigger the translation again and see if the images are being copied over.
3. I have tried to follow the steps you provide in order to connect again with the translation. In the secondary language I can not see the "Connect with translations" link hidden link. Instead of connecting from the English product, could you edit the Greek product and connect this English language product and see if it works?
4. Also when I am trying to assign the translation from the default language I get for a reasson a product variation in the default language hidden link. Why is the variation there? How can I link a product (not a page) to the translation? Step by step. This shouldn't be happening and it should only connect to the opposite language. Try triggering the connection and let me know how it goes.