Skip to content Skip to sidebar

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 39 replies, has 1 voice.

Last updated by walter-arielM 2 hours, 52 minutes ago.

Assisted by: Paweł Halicki.

Author Posts
April 8, 2026 at 9:35 am #17956176

Paweł Halicki
Supporter

Hello,

The snippet detected all products that could potentially have the same issue as this one:

* hidden link

I reviewed the list of returned products (based on the backup you provided), and after re-translating each of them, the language connections were preserved correctly. It looks like the previously executed SQL UPDATE already fixed those cases.

UPDATE `wp_icl_translations` SET `trid` = '84462' WHERE `wp_icl_translations`.`translation_id` = 46094;

My question: have you noticed any other problematic products? If so, please share them with me so I can investigate further.

The originally reported product appears to be fixed after applying the SQL update and updating the plugins on the prepared backup. It seems like the issue may have occurred during simultaneous edits, possibly leading to data inconsistency during an attempted fix.

If you find any additional problematic products, please report them - it’s possible they may have a different root cause, and I’ll be able to analyze them individually.

From my side:

* I checked all reported products
* I reviewed all products included in the SQL report
* I also checked several randomly selected products

I would appreciate your feedback.

Regards,
Paweł

April 14, 2026 at 10:10 am #17968047

walter-arielM

Hello,

Issue is still happening in this product: hidden link

Should I run your code in production site?
Please, I need a short and clear answer (juar YES/NO) for this question.

If answer is YES, please paste in your answer the last snippets you sent me to be sure I will use the right code.

I will be waiting for your answer.

Thanks.

April 14, 2026 at 11:00 am #17968272

Paweł Halicki
Supporter

Hello,

Thank you for the feedback - I will check what is causing the issue in this product.

For now, please don’t take any action. After analyzing this case, I will prepare a fix that resolves the issue for this product (and any others with the same problem).

Best regards,
Pawel

April 14, 2026 at 11:04 am #17968278

walter-arielM

Hello,

I just need the sql snippet to run in the production site. The snippet should fix all products with this problem.

I would really appreciate a solution to this issue as soon as possible. It is causing serious problems with my online store's sales.

Walter

April 15, 2026 at 8:32 am #17970534

walter-arielM

Hello,

Please, I need to fix this problem.
Let me know.
Walter.

April 16, 2026 at 8:10 am #17973133

walter-arielM

Hello,

I urgently need a resolution for this issue. This ticket was opened 45 days ago (February 27, 2026).

Please consider escalating this ticket to a higher tier.

I look forward to your prompt response.

Walter.

April 16, 2026 at 11:33 am #17974216

Paweł Halicki
Supporter

Hello,

I sincerely apologize for the wait time and the issues caused by this. The problem after switching languages is particularly difficult to resolve because two translation groups have been created (for the product and the product variation), which are now conflicting with each other.

I found one product you mentioned as an example, as well as another similar case:

* wp-admin/post.php?post=18673&action=edit&lang=es
* wp-admin/post.php?post=19140&action=edit&lang=es

I’ve prepared an SQL query that fixes the relationships (it identifies the correct translation group after the language change and reassigns the product to it). After running it, all items remain within a single group - in my case, it fixed 162 products.

Before running this, please make sure to create a backup (or test it on a staging copy of the environment). Also, after executing the SQL, please reopen the product edit screen (do not keep previously loaded tabs open).

UPDATE wp_icl_translations m
JOIN wp_icl_translations s 
    ON m.trid = s.trid AND s.language_code = 'ca'
JOIN wp_posts np 
    ON np.id = s.element_id
JOIN wp_icl_translations t2 
    ON t2.element_id = np.post_parent
SET m.trid = t2.trid
WHERE m.element_type = 'post_product'
  AND m.language_code = 'es'
  AND m.source_language_code = 'ca';

Please let me know the results after applying the fix. If the outcome is not satisfactory, I will escalate the issue to a higher tier.

Best regards,
Pawel

April 19, 2026 at 6:09 pm #17978906

walter-arielM

Hello,

It worked! Please give me a couple of days to manually check all the products that had this issue.
Thank you very much.

April 20, 2026 at 1:32 pm #17981235

Paweł Halicki
Supporter

Hello,

I’m very glad to hear that your issue has been resolved - I’m now waiting for full confirmation.

I’m also sorry that the whole process took so long. Due to the size of the case (reproducing and testing took a significant amount of time), as well as its complexity and highly specific nature (language changes), it required a considerable amount of work to ensure that correct connections were not broken and everything was properly aligned with existing data.

I hope the testing goes smoothly and that you won’t encounter such difficult or long-lasting issues when using our software again.

Best regards and have a nice day,
Paweł

April 21, 2026 at 7:11 am #17982698

walter-arielM

Hello,

Thanks so much for your help and for the kind words.

Regards,
Walter.