[Resolved] When using domains, and 1 of it is hidden, can't login
This thread is resolved. Here is a description of the problem and solution.
Problem:
When using different domain per language wp-admin and pages in the hidden language was not accessible even though user had already set "Display hidden languages" from the profile editor.
Solution:
- Clear cookies on all domains and browser cache.
- Check "Auto sign-in and sign-out users from all domains" at WPML -> Languages.
I am trying to: Edit content for a language domain that is set as "hidden". My user profile is set to be able to see hidden languages.
Link to a page where the issue can be seen: /
I expected to see: I expected to be able to login onto the domain that is marked as hidden, and afterwards view the front-end and back-end of the hidden language domain.
Instead, I got: I got redirected to the default domain homepage before I was able to go to /wp-admin/ or /wp-login.php/ on the hidden language domain. It's not related to any theme or plugin. The 302 redirect is issued by WPML, as per "X-Redirect-By" header.
EDIT:
Proposed solution: You should at least let users login onto every language domain, apart from it being hidden. The setting "login and logout of every domain" doesn't fix this either.
Firstly, To ensure the quickest and most accurate support, please provide your debug information so that I can get a look at some of your configurations. You can find it in WPML > Support > click on “Debug information” link. Please check this link for more info: http://wpml.org/faq/provide-debug-information-faster-support/
Regarding the issue, I test the issue on a sandbox site but was not able to replicate the issue. Even when a language is disabled from WPML -> Languages, if i go to my profile and I enable the option " Display hidden languages" there and save, I was able to view both frontend and backend of the hidden languages. As you can see on the sandbox site I setup which you can login using the next link:
hidden link
Note: You might need to click on Advanced and "Proceed to ...... (unsafe)" if you see Privacy error when viewing the translated page. This is because our Sandbox currently does not supports wildcard SSL.
Am I missing something here, can you please check it further on the sandbox site and let me know if you can replicate the issue there?
I can replicate the issue going to your test environment and trying to go to a freshly created content page in the hidden language, see video here: hidden link
EDIT: This redirect is normal, because I'm not logged in on the hidden language domain (because we're using domains as languages), you see, so WPML can't know I'm that user that can view hidden content. But the fact is that I can't navigate to the login page too: hidden link
I tried to test again and I am not able to replicate the issue as you can see in the following screen recording. ( I am testing with Chrome Windows Version 114.0..... (Official Build) ):
hidden link
It might be not working in your case due to redirection caches or history.
Can you please try:
- Clearing all browser cache and history or test on an incognito window.
- Deactivate all browser extensions to prevent any interference from them.
- Login to the site the switch to the secondary language ( hidden one ) from the top admin bar and try visiting the pages and wp-admin on the secondary language then see if it works.
If the issue persist, can you please let me know the exact steps that I need to follow in the sandbox site to see the issue. Also please let me know the browser that you see the issue on.
I was able to login and view content on the hidden language domain by taking these steps:
- Clearing cookies on all domains and browser cache;
- Checking "Auto sign-in and sign-out users from all domains" in Languages settings in WPML.