This thread is resolved. Here is a description of the problem and solution.
Problem: If you're using the 'Use directory for default language' setting in WPML, you might encounter several issues: 1. Accessing /wp-admin redirects to a 404 page at /nl/wp-login.php. 2. The wp-login.php page shows an 'ERR_TOO_MANY_REDIRECTS' error. 3. The logout link redirects incorrectly and prevents logging out. Solution: We recommend setting up a root page to resolve these issues. This can be either a WordPress page or an HTML file. For detailed instructions on how to set up a root page, please visit our guide on using a directory for the default language.
If this solution does not resolve your issue or if it 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. Should you need further assistance, please do not hesitate to open a new support ticket at our 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.
If I use the setting " Use directory for default language":
1. the /wp-admin is redirecting to /nl/wp-login.php?redirect_to=https%3A%2F%2Fwp.wildtrails.be%2Fwp-admin%2F&reauth=1 and goes to a 404 page.
2. wp-login.php is getting a "ERR_TOO_MANY_REDIRECTS"
3. log out link goes to hidden link and is not letting me log out.
I have deactivated all other plugins and reverted to a WP theme and the issue is still happening.
If I deactivate wpml the issue is no longer happening.
If I deactivate the setting "Use directory for default language", the issue is no longer happening
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: Europe/Madrid (GMT+01:00)
Hi,
do you have a staging environment where I can take a look?
I would eventually also need to request temporary access (WP-Admin and FTP) to your site
– preferably to a test site where the problem has been replicated if possible –
in order to be of better help and check if some configurations might need to be changed
Your next answer will be private which means only you and I have access to it.
❌ Please backup your database and website ❌
✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.
✙ Please add the Links to the […] Edit Screen, the Page/Post where you insert the […] and the corresponding Front End Page/Screen
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: Europe/Madrid (GMT+01:00)
Hi,
I’ve run several tests so far, but none of them resolved the issue.
Would it be okay if I create a copy of the site using a plugin such as Duplicator or WP All-in-One Migration so I can debug the problem locally? This would allow me to remove the .htaccess file and properly isolate the cause without affecting the live site.
Languages: English (English )Spanish (Español )German (Deutsch )
Timezone: Europe/Madrid (GMT+01:00)
Thank You! I’ve been able to confirm the issue within an isolated test environment, though it hasn't appeared in a clean reproduction yet. I am currently investigating this with our team and will update you as soon as we have more information.