Skip Navigation

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

Problem:
The client is experiencing a significant delay when switching languages on their website, taking about 10 seconds. The issue seems to be inconsistent, as sometimes the language switcher works correctly. A potential cause identified is a Cloudflare firewall rule that blocks access to pages containing 'wp-admin' from non-Italian IPs.
Solution:
1. We recommended the client to test the language switching functionality while being logged out to see if the issue persists.
2. We suggested deactivating the firewall temporarily to check if it resolves the issue.
3. We advised ensuring that the Ajax cookie is active in WPML -> Languages settings.

If these steps do not resolve the issue or if the solution 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 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.

Tagged: 

This topic contains 3 replies, has 0 voices.

Last updated by Carlos Rojas 3 weeks, 2 days ago.

Assisted by: Carlos Rojas.

Author Posts
April 17, 2025 at 7:49 am #16942368

FortunyShop

Background of the issue:
I am trying to switch languages by clicking on the language switcher on my website. The issue can be seen on this page: hidden link.

Symptoms:
Switching languages takes a very long time, approximately 10 seconds.

Questions:
Why does switching languages take so long?
How can I make the language switch faster?

April 21, 2025 at 8:13 am #16951147

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hello,
Thank you for contacting us

I visited the site, and switching languages was working correctly. However, switching languages and currency took longer, but just half a second more. I tested while not being logged in (because I have no credentials to access the site). Could you try reproducing the issue while also being logged out? If the issue persists, then I kindly ask you to share a link to a video so I can see exactly what steps you are following.

Looking forward to your message.
Regards,
Carlos

April 22, 2025 at 10:13 am #16954322

FortunyShop

So here's a recording of what's happening including the console error, however it's not consistent as the second time I tested the switcher worked fine:
hidden link

As you can see the language won't switch. However it works in the opposite way, from a translated language to English.
I am attaching a Cloudflare firewall rule that may be responsible for this, which basically blocks every attempt to acces a page containing the url "wp-admin" if NOT coming from Italy, our headquarters. Anyway it's strange because this rule is there since years, and this issue is something quite new.

Thanks for your help
Matteo

Screenshot 2025-04-22 121204.png
April 22, 2025 at 10:46 am #16954609

Carlos Rojas
WPML Supporter since 03/2017

Languages: English (English ) Spanish (Español )

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

Hi Matteo,
Thank you very much for sharing the screencast

I can see the 403 error in the console, and I suspect this might be caused by the firewall. Can you deactivate the firewall and double-check if the issue has disappeared?

Also, please go to WPML -> Languages -> And make sure the Ajax cookie is active.