[Resolved] Frontend Menu not switching anymore on language change
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing an issue where the menu randomly switching languages when accessing English version or accessing the site using the /en/ directory, despite the website being correctly translated. This problem arose even though the menu translation had been working for two years and all plugins were updated.
Solution: We recommended the following steps:
1. Ensure that the 'wp-content/languages' folder is writable on the server side as a notification was showing up on the WordPress dashboard related to it.
More information can be found here.
2. Suggested to update all plugins to the latest versions.
3. Perform a minimal setup test by setting a default WordPress theme, keeping only WPML Plugins active and disabling all other plugins
After checking the client's website, we found a theme option 'Speed Optimization', and resolved the issue by turning it off. That option was likely introduced in the newest release, which caused the menu to stop working correctly.
If the solution provided here does not resolve your issue, or if it seems outdated or irrelevant to your case, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, 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.
Hello,
since some weeks we are not anymore able to have our English menu visible when the language is switched to the correct language or the site is opened with the /en/ directory.
The website is correctly translated.
The menu translation always worked fine since 2 years we are using WPML.
Thank you for contacting WPML Support, I will be happy to help you.
I noticed that the menu appears on both versions of the website just the language seems to be switched (on the italian version the menu appears in english and viceversa).
- Can you tell me if the issue started when any specific plugin/theme got updated?
- Also, could you tell me how are you adding the menu to the website (are you using any page builder/theme option)?
------
* Would it be possible to check if the issue happens in a minimal setup, that meaning:
- keep the theme you have
- keep active only WPML Plugins and must have plugins (if any is needed for the theme)
- disable all other plugins
After, check if the issue is still happening.
Note: Please make sure you have a full backup (files & database) before trying anything on your website.
Hello Marsell,
We don't remember to have added a specific plugin before the issue started. The only massive thing we made was to implement some caching plugin to speed up the overall performances.
The menu is added and managed by the original WordPress Menu section.
I'll ask the IT to build a backup version of the site in order to deactivate the plugins and find the one that is causing the issue.
- Would it be possible to clear the cache of the website (from the plugin and from the server-side if you have any cache module/feature there), and check if the issue persists?
* Let me know when you have a staging site so we can troubleshoot further on that site.
I've deactivated the cache plugin from the test site (copy of the current one) but the issue still persist..
Do i need to deactivate the other plugins one by one to find the broken one or do you want the accesses to test directly the site?
In order to investigate this issue and understand it better, I would need a temporary access to your website (access to your site's WP-admin).
Please make a full backup of your site (files and database) and confirm it in your next reply.
* Note: I might need to enable/disable plugins, switch themes and access your website database.
Your next reply is set to private for you to provide the username and password details.
There is a notification showing up "WPML String Translation sta tentando di scrivere i file .mo con le traduzioni nella cartella:", could you please make sure that the folder "wp-content/languages" is writable on your server side. You can find more information related here: https://wpml.org/it/faq/cannot-write-mo-files/
* I also noticed that a few plugins require update, I would suggest you update them to the latest versions.
After, please check if the issue persists and let me know.