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

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 2 replies, has 2 voices.

Last updated by tomB-3 1 year, 7 months ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
October 9, 2018 at 1:41 pm #2800215


I am trying to:
Click the current language on mobile and show me the other available languages.

Link to a page where the issue can be seen:
hidden link (mobile)

I expected to see:
A new menu opening (which happens), but without instant redirect.
Showing me the other languages

I debugged this and I think I found the issue in file xdomain-data-4.0.7.js
Javascript checks if link url you clicked is not the same as current url and changes language if so. In my case this passes because the function does not take the last / into account.
But it should not pass and do nothing except opening next layer of the menu.
See attached image which makes it all clear.

October 10, 2018 at 6:19 am #2803070

Shekhar Bhandari

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thank you for contacting WPML support. I'd be happy to assist you further on this issue.

Please use the solution provided in this reply to fix the issue,

Let me know if this helps.


October 15, 2018 at 7:42 am #2816428


My issue is resolved now by using the suggested fix:

Even though I think the fix could be intergrated within the core wpml functionality.