Background of the issue:
I am trying to modify my menu, but sometimes when I do, other menu languages reset to English, and their relationships are removed. Some menu children items are missing, but parents always present.
Symptoms:
I got some SQL query WP errors in the menu dashboard in WordPress and wrong language, relationship information between menus.
Questions:
Why do other menu languages reset to English when I modify my menu?
How can I prevent menu relationships from being removed?
As we discussed in the chat, please share a package of your website and explain how to see and replicate the problem with menus.
You can upload the files to a service like Google Drive or Dropbox and share the link with me. For this, I'll enable a private message for the following reply.
I installed the package for your site on my local server. I needed to add a user through the DB and disable the plugins folder (and create an empty one) to be able to access it. Then, to be able to continue to check things, I activated only WPML and Strings Translation. I followed the steps you gave me but could not replicate the problem. I suspect that you experienced the following known issue.
Our second-tier supporter has installed the package of your site locally but was unable to replicate the problem. He also checked the DB and found nothing wrong or corrupted. Our second-tier supporter mentioned that he saw the LiteSpeed cache plugin on your site and suggested disabling the caching, deactivating this plugin, and checking again.
If the problem persists, please provide us with the proper steps to replicate this problem.
I'm still unable to replicate the problem with the last package you sent us. I'm following the steps you provided in a minimum environment (only WPML and Strings Translation are active).
1. Go to the menu dashboard page
2. Try to add a new menu item to any EN Menu
3. Switch to any other language
4. Try to reorder and add new menu item to menu
5. Repeat it until error displays
Following these steps, I did not get this error.
WordPress database error Duplicate entry '2099283-fr' for key 'trid_lang' for query UPDATE `wp_icl_translations` SET `trid` = '2099283', `language_code` = 'fr', `source_language_code` = 'en' WHERE `element_type` = 'post_nav_menu_item' AND `element_id` = '84525' made by wp_nav_menu_update_menu_items, wp_update_nav_menu_item, do_action('wp_update_nav_menu_item'), WP_Hook->do_action, WP_Hook->apply_filters, WPML_Nav_Menu_Actions->wp_update_nav_menu_item, SitePress->set_element_language_details, WPML_Set_Language->set, WPML_Set_Language->change_translation_of
We suspect a collision with the theme or another plugin might cause this problem. If possible, get your site into a minimum environment, switching to a default WordPress theme like TwentyTwenty-Four and having no plugins activated except WPML.
First, you must check if the problem persists when just the theme is switched to TwentyTwenty-Four (for example). If it persists, deactivate all plugins except WPML and its add-ons. Then, please check if the problem persists. If it does not continue, start by activating the plugins individually and checking when the issue comes back, then report to me which plugin was the culprit.
**** Important! Please make a full site backup (files and DB) before you proceed with those steps****
*** If your site is live, you might want to try those procedures in a staging environment or a snapshot of your site on your local server or another server. ***
Regards,
Itamar.
The topic ‘[Closed] Mismatching relationships between meNUS’ is closed to new replies.