Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 -
- 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 15 replies, has 2 voices.

Last updated by Long Nguyen 2 months, 4 weeks ago.

Assisted by: Long Nguyen.

Author Posts
June 9, 2024 at 2:49 pm #15719497

martinH-133

I am trying to: Operate WC as normally

Link to a page where the issue can be seen:

I expected to see: The same variation in the backend as the user checked out with

Instead, I got: Some other variation of the same product

The information in the wp_postmeta table seems fine. Also the information in the wp_woocommerce_order_itemmeta table is fine as long as noone opens the order in the primary language. The value "_wcml_duplicate_of_variation" in the wp_postmeta table is also set correctly.

I debugged that issue and found that there is a wrong entry in the wp_icl_translations table. I don't know how that happened, but it definitely shouldn't be possible.

Screenshot 2024-06-09 164728.jpg
June 11, 2024 at 2:52 am #15724306

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi Martin,

Thank you for contacting WPML support, I’m happy to help you with this issue.

According to the screenshot, I don't see an issue with the entries in the table icl_translations. There is a variation in the original language German and its translation in the English language.

I suggest you edit the variable product in the German language > Make a small change to the title/content > Update > Update the translation product and recheck this issue. If this persists, please share some screenshots of the issue. Then I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Looking forward to your reply.
Thanks

June 11, 2024 at 10:34 am #15725952

martinH-133

Hello,

I will share 2 further screenshots with you.

So in wp_icl_translations.jpg you see that the translation group should contain the id 212.660 and 248.923.
In wp_postmeta.jpg you can see that the linked variation should be with the id 248885 which is the correct one (212.660 is a completely different variation with differnent attributes but from the same parent).
In query-to_show-errors.jpg i created a query that shows where the issue occurs. You can see in the highlighted line that the element_id 212.660 is linked to 248.923 in wp_icl_translations but should be linked to 248885 instead.

In total i have 377 occurrences of that issue.

query-to-show-errors.jpg
wp_icl_translations.jpg
wp_postmeta.jpg
June 12, 2024 at 1:28 am #15729183

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

I understand the issue. Do you update the product and its translation as I suggested? Also, please try clicking some troubleshooting buttons below and see if it helps:

1. Go to WPML > Support > Troubleshooting:
- [Products, Variations] Synchronize posts taxonomies
- Clear the cache in WPML
- Remove ghost entries from the translation tables
- Set language information
- Fix terms count
- Fix post type assignment for translations

2. Go to WooCommerce > WooCommerce Multilingual > Settings > Troubleshooting:
- Sync products variations
- Fix translated variations relationships
❌ IMPORTANT: Please backup your database and website before proceeding ❌

Looking forward to your reply.
Thanks

June 12, 2024 at 1:41 am #15729185

martinH-133

Hello,

I would say I did all of that steps of troubleshooting already several times on different systems.
As there are close to 400 variants with that issue, I don't really want to start doing anything manually. Is there a way to rebuild the translation tables somehow?

I will run all of the provided steps tomorrow morning ~ in about 5 hours. But could you please ask your second level support if there is any script or something else that could be done to fix those entries. I really need that issue to be gone as it drives my customer crazy. (understandably)

June 12, 2024 at 3:36 am #15729250

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Is there a way to rebuild the translation tables somehow?

If you want to reset WPML and data, please follow the documentation https://wpml.org/documentation/getting-started-guide/language-setup/deleting-languages-and-plugin-data-by-doing-a-wpml-reset-on-your-site/

I will run all of the provided steps tomorrow morning ~ in about 5 hours

Please try all steps that I suggested. If it doesn't help, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info.
Then I will escalate this to our 2nd tier support accordingly.

❌ IMPORTANT: Please backup your database and website before proceeding ❌
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/
✙ I would need your permission to de-activate and re-activate Plugins and the Theme to change configurations on the site if needed. This is also a reason the backup is critical.

Looking forward to your reply.
Thanks

June 12, 2024 at 10:23 am #15730796

martinH-133

Hello,

sadly nothing of the automated actions helped.

I really understand that you have your support protocols in place but please understand that just trying to fix stuff with automated actions in cases where they actually can't help due to the action they should do, is quite annoying for a customer when he already went through a whole lot of debugging, db duplication, process debuggin (xdebug) and so on and already presents you with the issues that exist in the database and just needs a possibility to fix the issue.

I would have to set up a new staging environment in that.

June 13, 2024 at 1:30 am #15733807

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

In order to escalate the issue, I would like to request temporary access (wp-admin and FTP) to your site or have a site backup file. Your next reply is set to private to share the info.
You can use this plugin to create the backup: https://wordpress.org/plugins/duplicator/

Looking forward to your reply.
Thanks

June 23, 2024 at 11:00 am #15793874

martinH-133

It had todo with using the new import export plugin and the new variables for translation groups. Due to a mistake the translation group custom field was set the same for all variations of a variable product. So instead of 1 entry for each language in the translationgroup, there where multiple e.g. 50. So it seems that it just took the first it found then and assigned the other language to it.

Even though it was our mistake, that lead to the confusion I would highly recommend a security check before running any linkings are done by the "WPML Imports & Exports" Plugin.

It should be checked if there are more database entries with the same translation group value set then there are languages. That would be easy to implement and can save users from loads of corrupting imports.

Please let me know if something like that is implemented. Because even though I know now what the issue was, mistakes do happen all the time and it would be really nice to know, that that issue can't come up again.

June 24, 2024 at 2:20 am #15800366

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

So it was a mistake when importing content with the plugin WPML Export and Import. In order to escalate the issue, can you please help me replicate the issue on a clean installation of WordPress? You can access the admin area directly with this link
hidden link

- Don’t restore your site there.
- Try to replicate the issue with a few products/variations and minimal steps.
- Share the import file.
- Then let me know the steps to replicate it.

Thanks for your co-operation.

July 2, 2024 at 9:03 am #15873681

martinH-133

Hello,

i thought that the issue was resolved due to the fix of the sku, but it seems that it is still there and just happening when there are more than 5000 entries to process and the database is running on mariadb. As I assume, that the environment you sent me is running mysql 8 and not maria db i think i won't be able to replicate the issue there.

I could replace the following tables on a staging environment if you want me to, that should replicate the issue (all wp_icl_* tables + wp_posts + wp_postmeta)

July 2, 2024 at 9:43 am #15873964

martinH-133

The query takes ages on a high end server (16 Core, 32 Threads, Ryzen 5950X, Assigned 4GB RAM). mariadb 10.6.16. And after the first count times out.

July 2, 2024 at 9:52 am #15874021

martinH-133

After the fourth run it finished the cycle now after total 1h or so, but I think that it is not really the goal of the new plugin, that it is not working on mariadb or only partly on a high end server

July 2, 2024 at 9:57 am #15874154

Long Nguyen
Supporter

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

If the issue is related to the new import plugin WPML Export & Import, I suggest you try to import content in multiple languages on your site with WPML All Import and see if it helps.
Please follow the documentation https://wpml.org/documentation/related-projects/legacy-wpml-all-import/importing-multiple-languages-with-wp-all-import-and-wpml/

Looking forward to your reply.
Thanks

July 2, 2024 at 11:26 am #15874739

martinH-133

The "old" way does work, but as far as I understand, it is the goal to abandon the WP all Import Plugin (it is marked as legacy) so I would really like the new plugin to work great before some compatibility issues arise. If you don`t think so, please redirect the issue to someone who can help me to fix the issues the import & export Plugin.

The topic ‘[Closed] Wrongly translated Product Variants in secondary lang order viewed in primary’ is closed to new replies.