Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: Europe/Madrid (GMT+02:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by Paola Mendiburu 9 months ago.

Assisted by: Paola Mendiburu.

Author Posts
August 2, 2024 at 9:10 am

VA

Background of the issue:
I want to log out from the admin area but I'm not able to do so. The issue is tested on 3 sites having the latest WPML CMS v4.6.12, String Translation v3.2.14, and Media Translation v2.7.3. In every case, English is NOT the default language (HU is; no more languages besides enabled). On 1 site English is NOT hidden, on 2 it IS hidden.

Symptoms:
Where EN is hidden, the logout link (admin area, top right corner, etc.) incorrectly looks like: hidden link so it contains 'en' incorrectly!

Questions:
Why does the logout link contain 'en' when English is hidden?
How can I fix the logout link issue when English is hidden?

August 2, 2024 at 10:09 am
August 2, 2024 at 1:13 pm #16033677

Paola Mendiburu
WPML Supporter since 11/2020

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

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

Hi there!

I have tried to reproduce the issue here:
hidden link

But as you can see it is working properly.

If the issue persists could you please try this solution:
https://wpml.org/forums/topic/cannot-logout-when-wpml-is-active/#post-14504687

August 2, 2024 at 2:04 pm #16033832

VA

Hi Paola,

1) I don't want to disable "Allow translating the login and registration pages"
Managing mono- or multilingual sites with non-English default language has a best practice, what I also follow:
- install WP, themes, plugins, while WPML default language is EN
- install theme templates, which means say about 5 pages ( About, Contact, Login/Logout, etc.), so these pages will be in WPML in EN for sure
- scan WP, theme, relevant plugin strings
- set most of WPML settings to final setting
- change default language, finalize WPML settings like: hide EN
- keep my admin default language as EN, mainly for troubleshooting purpose

So i clearly want to have pages also of hidden languages, eg. for WPML debugging of other possible issues.

i repeat: the admin links URL should be consistent for all possible WPML settings, either ALL should contain the reference to the profile default language (EN) or NONE, it must not be mixed up, as of now, when "Edit Profile" link URL DOESN'T contain "en", while "Logout link URL DOES !

2) I checked your repro site and I see it works.
Can you compare with a tool, eg. programatically the difference of the WPML settings of the 2 sites, eg. from the WPML support data I've uploaded to the ticket?
Comparing it manually is a pain in the...
and I hope this exported support data is for such a purpose.
BTW "Allow translating the login and registration pages" setting should not affect a page's URL modifier ( adding or not "en" into the URL )...

August 5, 2024 at 9:24 am #16038463

Paola Mendiburu
WPML Supporter since 11/2020

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

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

When I try to access your site to the wp-admin I get "Sorry, you are not allowed to access this page."

Please go to you profile and activate the option "Display hidden languages" and let me know if it works.

August 5, 2024 at 6:41 pm #16041431

VA

- You wrote you could reproduce the issue on a clean site and when I asked you whether you need admin access to my site anymore, you answered no, so I removed your admin access...
- after activating "Display hidden languages" logout works.
I'll think about and test it whether it causes any unwanted issues on 2 of my sites,
I think it is just a workaround, it should work properly with both settings, but maybe acceptable...

August 6, 2024 at 7:05 am #16042595

Paola Mendiburu
WPML Supporter since 11/2020

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

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

That is expected when language is hidden that is the reason why you need to activate the option "Display hidden languages" otherwise will not work.

The topic ‘[Closed] Logout not working when language is hidden’ is closed to new replies.