Skip to content Skip to sidebar

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

Problem:
The client reported an issue with WPML where after translating Polish course content and working with translated menus, the menu system broke. The English menu and language switcher continued to function correctly, but in Polish, Danish, and Slovenian, the header only displayed the logo/site title/search icon, with menu items and the language switcher missing. The footer language switcher appeared only in English. Despite attempts like checking translated menus, running WPML Menus Sync, and clearing cache, the issue persisted.

Solution:
We investigated the issue and found that the Slovenian menu was not saving correctly, which could indicate a plugin/theme conflict, custom code interference, or database inconsistency. We used WPML troubleshooting tools to clean up leftover translation data and synchronize the menu relationships. After these steps, the Slovenian menu saved successfully and changes persisted. We recommended the client manually edit each menu in its respective language, arrange the menu items, pages, and order as desired, and not run menu sync since custom menu links were used.

If this solution does not resolve your issue, or if it seems outdated or irrelevant to your 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 problems persist, please open a new support ticket 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.

Tagged: 

This topic contains 30 replies, has 1 voice.

Last updated by Dražen 2 weeks, 5 days ago.

Assisted by: Dražen.

Author Posts
June 11, 2026 at 6:07 am #18095172

tjasaR

Hello WPML Support,

I need urgent help with a WPML menu/language switcher issue on my WordPress site.

I am using WPML together with Tutor LMS for an Erasmus+ e-learning course. The English course is the master version. To make the correct final course items easy to identify in WPML, I temporarily added a “PT-” prefix to the English master course/module/lesson titles. This was only done so I could clearly identify the final PageTurners items during translation.

Before I started the new Polish translation, all menus worked correctly in all languages: English, Polish, Danish, and Slovenian. The language switcher was also visible and working correctly in all languages.

After translating the Polish course content and working with the translated menus, the menu system broke. Now the English menu still works correctly, including the language switcher, but in Polish, Danish, and Slovenian the header only shows the logo/site title/search icon. The menu items disappear, and the language switcher is also missing. The footer language switcher also appears only in English.

I already tried the following:

Checked that the translated menus exist:
E+learning
E+learning - Polish
E+learning - Danish
E+learning - Slovenian
Checked that the Polish menu is connected as a translation of the English E+learning menu.
Ran WPML Menus Sync. WPML showed the correct mapped menu structure:
Homepage → Strona główna
About → O nas
Learning courses → Kursy edukacyjne
Register now → Strona rejestracji studentów
Applied the WPML menu synchronization.
Checked menu locations and tried assigning the main E+learning menu.
Recreated the WPML menu language switcher under WPML → Languages.
Cleared cache and tested in incognito.

The issue still remains: English works, but Polish/Danish/Slovenian menus and language switchers do not display on the frontend.

This is a serious issue because before the Polish translation process everything worked correctly in all languages. Now the multilingual navigation is broken, which makes the course unusable for participants in the translated languages.

Please investigate and fix the WPML menu/language switcher configuration or any database/menu-language relationship issue that may have been caused during translation/menu sync. I need the menus and language switcher restored in all languages.

If WPML cannot make the multilingual menus and language switcher work reliably with this setup, then I will need to request a refund, because the plugin is currently not functioning correctly for the multilingual course structure I purchased it for. As now i spent 3 days just adjusting and editing and in the end wpml mage own copies of menus etc.

Thank you.

June 11, 2026 at 8:32 am #18095560

tjasaR

Language switche is present in english but dissapears in Polish, Danish and Slovenian, from the header and footer. Also menus are present in the english header but dissapear or are mixed up in other languages. After sync menus, in wordpress menu setting new menus apear.

June 11, 2026 at 9:47 am #18095940

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

This is a new ticket, so let's investigate it step by step. I'm sure we can reach a solution if we focus on one issue at a time.

Posting multiple issues and replies together makes the conversation much harder to follow and can slow down the troubleshooting process.

Let's start with the menu issue.

I checked the Polish menu and noticed that it is currently empty when edited. Could you please go to the following page and add the correct menu items manually there?

hidden link

Please do the same for the other languages and make sure to mark them as primary, same as you ahve in default language.

Once you've done that, let me know whether the menu is displaying correctly on the frontend. If it is, we can move on to the next issue and continue from there.

Regards,
Dražen

June 11, 2026 at 10:32 am #18096121

tjasaR

Additional issue:

The translated menus are now not saving correctly. For example, when I try to add the required pages to the Slovenian menu and click “Save Menu”, the menu becomes blank again after saving.

I also see duplicate translated menu names such as “E+learning - Slovenian-1”, and the menu location shows “Currently set to an unknown menu”. This suggests that WPML menu synchronization created duplicate or corrupted translated menu relationships, and WordPress/WPML may now be pointing the Primary/Mobile menu locations to orphaned or unresolved menu IDs.

Please check and repair:

the WordPress nav menu location assignments;
the WPML menu translation relationships;
the duplicate translated menus such as “E+learning - Slovenian-1”;
why translated menu items disappear after saving;
why the frontend shows the English menu correctly but translated menus disappear;
why translated Tutor LMS lessons can lose their parent course connection and trigger a null course_id error.

Before the new Polish translation and WPML menu synchronization, all menus and the language switcher worked correctly in English, Polish, Danish, and Slovenian. The issue appeared only after the Polish translation/menu sync process.

Please restore the multilingual menu structure and language switcher functionality.

June 11, 2026 at 1:24 pm #18096821

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thank you for the detailed information. However, as I mentioned before, repeating the same reports and posting long descriptions of multiple issues makes it difficult to focus on and resolve the actual problem. Let's continue working on one issue at a time please.

Regarding the menu issue:

I checked the site, but I was not able to find any duplicate menus as described. What I did find was that the Slovenian menu was not saving correctly, which can indicate a plugin/theme conflict, custom code interference, or some form of database inconsistency.

As part of my investigation, I ran the WPML troubleshooting tools to clean up leftover translation data and synchronize the menu relationships. After doing so, I was able to save the Slovenian menu successfully, and the changes persisted correctly.

Could you please check from your side and confirm whether this issue is now resolved?

I look forward to your feedback.

Best regards,
Dražen

Menus-‹-Erasmus-Learning-—-WordPress-06-11-2026_03_20_PM.jpg
June 11, 2026 at 1:31 pm #18096880

tjasaR

Indeed, can you tell me why it didnt save on my side? Still the wpml lang switcher is visible only on the english site, as soon as you switch to another lang it dissapears, also from the footer. Thank you for now.

Screenshot 2026-06-11 at 15-31-30 Erasmus Learning.png
June 11, 2026 at 1:33 pm #18096903

tjasaR

If you can conect the lang switcher to all languages would be perfect, so that i can proceed.

I will add probably one or 2 pages still, but this shouldnt be a problem later right?

June 11, 2026 at 1:38 pm #18096911

tjasaR

Another thing maybe important. I i go to learning courses ege učni tecaji and scroll down and choose the course, it takes me to the course and also the lang switcher appears and is visible on all languages?!

Maybe its a wp problem on the site?

Screenshot 2026-06-11 at 15-37-41 Darmowy kurs online “PageTurners – Erasmus Learning.png
Screenshot 2026-06-11 at 15-37-53 Gratis onlinekursus ‘PageTurners’ – Erasmus Learning.png
Screenshot 2026-06-11 at 15-36-01 Brezplačni spletni tečaj “PageTurners – Erasmus Learning.png
June 12, 2026 at 6:57 am #18098360

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I checked the menu again, and unfortunately the same issue is still occurring.

At this point, I'm not entirely sure what is causing it, but I suspect it could be related to the hosting environment, as I've seen hosting-level restrictions or caching mechanisms cause similar issues in the past.

Could you please check the following with your hosting provider?

- Whether Object Cache (Redis, Memcached, etc.) is enabled.
- Whether there are any security restrictions that could interfere with WordPress requests.
- Whether any PHP, database, or server errors are being logged when the issue occurs.

Also, would it be possible to maybe move the site on a different hosting environment?

I look forward to your feedback.

Best regards,
Dražen

June 12, 2026 at 8:29 am #18098600

tjasaR

"Hi Dražen,

I have an important update. I moved the language switcher into a custom slot widget using Elementor, and I also tested WPML’s custom switcher slots.

Here is the behavior: The switcher displays and functions perfectly on the default English homepage (/). However, the moment I switch to any other language homepage (e.g., /pl/ or /da/), the switcher widget completely vanishes from the rendered page canvas.

The homepages are verified as 100% fully linked translations in the database. I have disabled server-level Edge Caching and completely cleared the Memcached Object Cache, yet the layout omission on localized root URLs persists. It seems the server or theme environment is strictly blocking WPML execution on non-default root directories.

Could you check if there is an operational conflict between how the theme renders its main loops on translated front pages vs. the default front page?"

Hi Dražen,

I checked our hosting server logs, and I found the definitive smoking gun. Every single time the language switcher fails to load on a non-English homepage, the server records a flood of identical PHP warnings from WPML.

Here are the exact log details:

Source: sitepress-multilingual-cms

File: /srv/htdocs/wp-content/plugins/sitepress-multilingual-cms/inc/wp-nav-menus/wpml-menu-sync-functionality.class.php

Line: 317

Message: PHP Warning: Attempt to read property "term_id" on null

It appears that during the homepage menu compilation loop for translated pages (Polish, Danish, Slovenian), the sync class is looking for a menu or taxonomy term ID that it expects to exist, hitting a null value instead, and crashing the rendering sequence before the switcher elements can output.

What database repair or menu-mapping cleanup step should I run to fix this missing term_id on line 317?

Best regards,

June 12, 2026 at 8:37 am #18098647
tjasaR

Hi Dražen,

I have one more crucial piece of data from the hosting web server traffic logs that isolates this perfectly.

When testing live requests to the translated roots, the server returns a clean HTTP Status 200 for both the default root (/) and the localized directory roots (like /pl/).

This confirms that the web server is communicating flawlessly and routing the subfolders correctly. There are no server routing drops or blockages on /pl/.

Instead, because the server is successfully delivering the page but the switcher is simply missing from the output HTML, it proves that the execution is breaking internally within WordPress during runtime—specifically right where the flood of PHP warnings points:

wpml-menu-sync-functionality.class.php on line 317

Since the server is doing its job and passing the directory request, what is the best way to manually patch or reset this menu-sync class conflict so it stops stripping the switcher container on these 200-OK translated loops?

New threads created by Dražen and linked to this one are listed below:

https://wpml.org/forums/topic/split-language-switcher-not-working/

June 12, 2026 at 8:57 am #18098771

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

I am glad you carried out such a thorough investigation and shared these findings.

However, based on what I can see from the information provided, I am not convinced that the PHP warning itself is the root cause of the issue, although it may certainly be related.

To me, it still looks like something in the environment is interfering with WPML's ability to properly save and synchronize menu data. Earlier in our troubleshooting, the translated menus were not saving correctly, and after running the WPML troubleshooting tools, they started working again. The warning from `wpml-menu-sync-functionality.class.php` may simply be a symptom of the underlying issue rather than the cause.

Since the language switcher relies on the correct menu and language configuration being available, if the menu synchronization is failing or the translated menus are not being stored correctly, that could also explain why the switcher disappears on translated pages.

As mentioned previously, the next step I would recommend is temporarily disabling the object cache completely and testing again. Even if the cache has been cleared, some object caching layers can still cause unexpected behavior with WPML's menu synchronization.

If disabling the object cache is not possible, or if the issue persists afterwards, please allow me to take a copy of the website. I would then test it on a different server environment to determine whether the same behavior occurs and investigate the issue further.

Please let me know if you can test without object caching or provide a Duplicator site copy for further analysis.

- https://wpml.org/fr/faq/provide-supporters-copy-site/

Best regards,
Dražen

June 12, 2026 at 9:24 am #18099013

tjasaR

Here is the shared folder and duplicator file. you have edit rights: hidden link

June 12, 2026 at 10:58 am #18099215

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thank you for sharing the folder.

However, I am a bit confused, as it appears that you shared the Duplicator plugin files rather than a Duplicator package of your website.

What I need is a full Duplicator site copy, as explained in the guide I shared earlier.

Please have a look at the guide again and generate a full site package or give me permission to do so.

- https://wpml.org/fr/faq/provide-supporters-copy-site/

Also, could you please let me know whether you were able to test with the object cache completely disabled? Since the issue appears to be related to menu synchronization and data persistence, this is still an important step in the investigation.

I will be waiting for your reply.

Best regards,
Dražen

June 12, 2026 at 11:14 am #18099242

tjasaR

Hello disabled global cach, but have no option to turn off object cach. But i cleard cach and tested it and it stays the same.

I reuploaded the instaler
hidden link

Screenshot 2026-06-12 at 13-12-26 Sites — WordPress.com.png