Skip Navigation

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

Problem:
The client reported that the language switcher dropdown was not functioning on two recently translated pages, although it worked on other pages. The issue was not related to WP Rocket, Cloudflare, or Advanced Ads.

Solution:
We recommended the following steps to diagnose and potentially resolve the issue:
1. Enable the Footer Language Switcher via WordPress Dashboard > WPML > Languages > Footer Language Switcher and check if the second language flag appears at the bottom of the page.
2. If the flag appears, it might indicate a JavaScript issue. To investigate further:
- Create a backup of the website.
- Switch to a default theme like "TwentyTwenty" via WordPress Dashboard > Appearance > Themes.
- Deactivate all plugins except for WPML and its add-ons via WordPress Dashboard > Plugins.
- Check if the issue persists. If not, reactivate plugins one by one to identify the problematic plugin.
3. If the second language flag does not appear in the footer, the page might not be translated correctly. To address this:
- Go to Dashboard > Pages and open the edit screen of the original page.
- Make a minor edit and save it.
- Update the translation to ensure it is 100% complete.

If these steps do not resolve the issue, we requested the client to provide access to their WordPress dashboard after ensuring a backup is in place, and to set the reply as private.

Please note that this solution might be outdated or not applicable to your specific 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 the problem persists, 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.

This topic contains 4 replies, has 2 voices.

Last updated by arnoP-3 2 years, 2 months ago.

Assisted by: Christopher Amirian.

Author Posts
April 3, 2023 at 7:10 am #13387303

arnoP-3

Hi,

I found that the language switcher does not work (dropdown does not open) on two pages that were recently translated. Whether that is the reason I don't know. It does work on other pages.

WP Rocket and Cloudflare are disabled.

Any ideas what might cause this? I can get you a login if you need to check the site.

Kind regards,
Arno

April 3, 2023 at 8:31 am #13387863

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi Arno,

Would you please go to WordPress Dashboard > WPML > Languages > Footer Language Switcher and enable that option?

Then go to the front end of the website and use that at the bottom of the page and see if the second language flag shows there or not.

If yes, then it must be a Javascript issue happening on that page and you can test the steps below to find the culprit:

- IMPORTANT STEP! Create a backup of your website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except WPML and its add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

But if the second language flag does not show in the footer language switches that shows that the page is not translated correctly. For that please do as follows:

- Go to your Dashboard > Pages.
- Open the edit screen of the original page. You should see a pencil/circle/gear icon in the sidebar options under the "Languages" section.
- Make a small change, for example, add an extra blank space at the end of a sentence/paragraph.
- Save it.
- You should now see that a circular arrow appears beside the 2nd languages links, this means that an update is required.
- Edit the translation again and save it up to 100% translated.

If the problem is still there, I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.

Make sure you set the next reply as private.

And please give me the link to the page in question.

Thank you.

April 3, 2023 at 12:23 pm #13389787

arnoP-3

Hi Christopher,

Thanks for the suggestions. I went through all of it and finally found that it is caused by a setting of the Advanced Ads plugin. It has page-specific settings. If I disable the setting "Disable ads on this page" (so, allow ads), then the language switcher works fine. If I do not allow ads, the switcher is stuck and does not show the secondary language. The browser console does not throw any errors.

I guess I will have to contact Advanced Ads.

Kind regards,
Arno

April 3, 2023 at 1:38 pm #13390771

Christopher Amirian
WPML Supporter since 07/2020

Languages: English (English )

Timezone: Asia/Yerevan (GMT+04:00)

Hi Arno,

I'm glad that you have managed to find the culprit.

Thanks.

April 3, 2023 at 4:24 pm #13392851

arnoP-3

Hi Christopher,

For future people with the same issue: it was not caused by Advanced Ads either. It was a coincidence that without the ad, the language switch happened to have not enough space below it. So, the dropdown item did technically work but was not visible. I needed to add more bottom margin.

I'll close this ticket now.

Thanks,
Arno