Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues with Toolset relationships getting mixed up or disappearing after reactivating WPML on your WordPress site, it might be due to a potential database corruption. This problem typically occurs when WPML is deactivated during development and then reactivated.
Solution:
We recommend running a custom SQL query to correct the mismatch in the database entries for the relationships. Here is the SQL query you should execute:

UPDATE wp_toolset_connected_elements<br />JOIN wp_icl_translations<br />ON wp_icl_translations.element_id = wp_toolset_connected_elements.element_id<br />SET wp_toolset_connected_elements.wpml_trid = wp_icl_translations.trid<br />WHERE wp_icl_translations.trid != wp_toolset_connected_elements.wpml_trid;

You can run this query on your staging server first to ensure it resolves the issue without affecting your live site. If successful, apply the same query to your production site.

Please note that this solution might be irrelevant if it's outdated or not applicable to your specific case. 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.

Our next available supporter will start replying to tickets in about 2.25 hours from now. Thank you for your understanding.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Lauren 1 month, 2 weeks ago.

Assisted by: Lauren.

Author Posts
September 23, 2024 at 8:04 pm

katerinaA

Background of the issue:
We are encountering a problem on our WordPress site where we have both Toolset and WPML installed. During the development process, we temporarily deactivated WPML, planning to reactivate it once the development was complete and ready for a single language setup. The site includes several relationships that were created using Toolset.

Symptoms:
After reactivating WPML, these relationships seem to get mixed up or disappear entirely. When we deactivate WPML again, the relationships appear correctly.

Questions:
Could you please assist us in resolving this issue?
Any guidance or suggestions would be greatly appreciated.

September 23, 2024 at 9:50 pm
September 24, 2024 at 7:01 pm #16217228

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I have been trying to troubleshoot your site but someone keeps changing the admin language back to Greek. I need to be able to troubleshoot in English. Please create a separate admin account for my email lauren.j@onthegosystems.com so that I can continue troubleshooting in English. I have marked the next reply as private so you can send me credentials there.

Thank you.

September 25, 2024 at 12:30 pm
September 30, 2024 at 8:10 pm #16237591

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I have set the site to minimal settings and am continuing to troubleshoot this issue. I will update again here once I have more information. Thanks for your continued patience.

October 1, 2024 at 2:51 pm #16241284

Lauren
Supporter

Languages: English (English )

Timezone: America/New_York (GMT-05:00)

I escalated this issue to our second tier supoprt and they found that the database appears corrupted. We can't say what could have caused this since we don't know the history of the site, but he created a couple of test posts and connected them via the same relationship, and they work normally and are stored in the database normally, so it should be okay going forwards if we fix the historical data.

To do that on this staging server, he had to run a custom SQL query (which I did via Adminer, made available by the plugin 'Database Management Tool - Adminer').

This is the query he ran:

UPDATE wp_toolset_connected_elements
JOIN wp_icl_translations
ON wp_icl_translations.element_id = wp_toolset_connected_elements.element_id
SET wp_toolset_connected_elements.wpml_trid = wp_icl_translations.trid
WHERE wp_icl_translations.trid != wp_toolset_connected_elements.wpml_trid;

It appears to have fixed the example shared in our chat, but please let me know if you are seeing any other posts that still have the problem.

You can apply the same SQL query to the production site and let me know if this resolves the issue there.