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.

Our next available supporter will start replying to tickets in about 3.43 hours from now. Thank you for your understanding.

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

This topic contains 2 replies, has 2 voices.

Last updated by tomB-3 1 year ago.

Assigned support staff: Shekhar Bhandari.

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

tomB-3

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
Supporter

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, https://wpml.org/forums/topic/opening-language-switcher-drop-down-causes-refresh-page/#post-1182747

Let me know if this helps.

Thanks

October 15, 2018 at 7:42 am #2816428

tomB-3

My issue is resolved now by using the suggested fix: https://wpml.org/forums/topic/opening-language-switcher-drop-down-causes-refresh-page/#post-1182747

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