[Resolved] Menu items in Spanish still show old links
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing issues with menu item links and labels not updating correctly in the Spanish version of their site. Specifically, the link for 'Recetas' was incorrect, and the footer label 'Guarniciones' was not updating to 'Extras' despite being translated. Solution: The client resolved the issue by editing the menu items to different values, then translating them, and finally restoring the original English values and retranslating. This process seemed to trigger a cache refresh which resolved the issue. Additionally, the WPML support team had suggested verifying and updating translations via WPML → String Translation, synchronizing menus through WPML → WP Menus Sync, clearing site and browser cache, and checking server requirements including increasing the WP_MEMORY_LIMIT.
If this solution does not resolve your issue or seems irrelevant due to being outdated or not applicable to your case, we recommend opening a new support ticket. We also 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. For further assistance, please visit our support forum at WPML support forum.
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.
Background of the issue:
I manage the translation of my site using WPML. I am trying to ensure that all menu items and their links are correctly translated and updated in the Spanish version of my site. The issue can be seen on this page: hidden link.
Symptoms:
The links to several menu items and some of their labels are not updating in the Spanish version. Specifically, the link to 'Recetas' in the header is showing as /es/recetas-2 instead of /es/recetas. Additionally, the footer label 'Guarniciones' should be 'Extras', but it is not updating despite being translated.
Questions:
Why are the menu item links not updating in the Spanish version?
How can I ensure that the correct translations are applied to the menu items?
Could you please increase the WordPress memory limit (WP Memory Limit) to at least 256 MB? WPML requires at least 128 MB.
Your current values are:
PHP Memory Limit 512M
WP Memory Limit 40M
To do this, you need to connect to your website's server and open the wp-config.php file in a text editor. The file is located in the WordPress root directory.
Add this code to the wp-config.php file to increase WordPress's memory:
define ('WP_MEMORY_LIMIT', '256M');
Add this just before this comment:
// That's all, stop editing! Happy blogging.
The current values can be viewed under WPML > Support > WordPress.
After adjusting the limit, please run WPML > WP Meny Sync. After running this dialog, check the bottom of the result for further instructions, as Custom Menu items need to be translated at WPML > String Translation or directly in each menu at Appearance > Menus.
Exception:
If you are using a Block theme, the menu will need to be translated at WPML > Translation-Dashboard by creating a job for the navigation menu and then translating at by going to WPML > Translations.
If this does not solve the issue, please let us know.
I had increased the the WP Memory Limit from 40M to 128M before I submitted the ticket, and that did not resolve the issue. I just increased it to 256M, and the issue is still not resolved.
I'm using a block theme and had finished translating all Navigation Menus - they show as translated for Spanish (check-mark) on the Translation Dashboard. However, the menus being displayed on my site was still displaying old values (e.g. Guarniciones on the Footer menu, and the old link (/es/recetas-2) for Recetas, instead of the updated link (/es/recetas/).
ISSUE RESOLVED
However, I was able to resolve my issue by editing items in the menus to a different value and then translating them and editing the English values back to the original and retranslating. This took care of it. I had cleared the browser cache, WP cache, etc., before opening the ticket. I wonder if this was related to some caching and the edits triggered the cache refresh. Thoughts?
Hi Avi,
My name is Carlos, and I will continue in this ticket.
I'm happy to hear that you managed to solve the issue. Sometimes, the cache memory can negatively influence the translation; that's why it is recommended to deactivate the cache plugins or flush the cache memory if you find a translation issue.