Skip Navigation

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

Problem:
The client's menus were translated correctly in the WPML settings but were only displaying in English on the front end of the blog.
Solution:
We found that the issue was related to the

cache_results

setting within the

wp_nav_menu

function, which was set to true. This setting, when enabled, causes WordPress to store query results in a cache, leading to the problem experienced. By setting

cache_results

to 'false' and resynchronizing the menu items, we resolved the issue.

If you're experiencing a similar issue, we recommend checking the

cache_results

setting in your

wp_nav_menu

function and setting it to 'false'. Then, resynchronize your menu items.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the problem persists, we highly recommend checking 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.

This topic contains 4 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 2 months ago.

Assisted by: Prosenjit Barman.

Author Posts
February 4, 2024 at 5:11 pm #15263841

stanislavK-12

Hello

I would like to ask for help please, in my menu settings my menus are translated properly to all languages, but show only in english on the front of the blog. I attach the screenshot and debug information.
I have checked and I think I have the latest version of the WMPL plugin, I also enabled automatic updates for it.

Thank you for your help!

Menu-error-WPML.png
February 5, 2024 at 12:45 pm #15266089

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thanks for contacting WPML Support.

I understand the issue you're having and will try my best to assist you in this matter.

I've checked and found that the Categories have been accurately translated into other languages. Given that the Menu includes these Categories, the links for the categories within the menu should automatically update to reflect the translations in other languages. Since it is not happening, please try the following and check if that helps in solving the issue.

- Please go to "WPML > Support > Troubleshooting"
- Click on the buttons marked in this screenshot: hidden link
- Once the process is completed, please synchronize the Menu by following the instructions mentioned in this guide: https://wpml.org/documentation/getting-started-guide/translating-menus/#easy-customizable-wp-menus-sync

Please let me know if that helps in solving the issue or if you need further assistance in this matter. I will be happy to help.

Best regards,
Prosenjit

February 6, 2024 at 8:25 am #15269301

stanislavK-12

Hello

Thank you, I have performed the actions you said, on the last step of the menu sync I did get a message that there is nothing to sync. It appears that the method did not help, I attach the screenshot from the menu sync.

nothing-to-sync.png
February 7, 2024 at 3:31 am #15274260

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thank you for trying out the suggestion.

As the issue persists, a closer inspection will be required to understand the root cause of the issue.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated.

You will find the needed fields below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT
-Please backup site files and database before providing us access.
-If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:
hidden link

Looking forward to your response.

Best Regards,
Prosenjit

February 8, 2024 at 5:20 am #15279577

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
Thank you for sharing the access information.

I've checked and successfully managed to display the translated menu in other languages. The issue was linked to the `cache_results` setting within the `wp_nav_menu` function, which was initially set to true (Screenshot: hidden link). When it is enabled, WordPress stores the query results in a cache and retrieves them from there, which was at the root of the problem.

By changing the setting to 'false' and resynchronizing the menu items, the issue was promptly resolved. For reference, please view this screenshot: hidden link

I hope it helps. If you require any more help, please don't hesitate to reach out. I'll be happy to help.

Best regards,
Prosenjit