-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on login redirect #749
Comments
Yes i can reproduce this. Thanks for reporting! This should not have any strong effect in production mode, but the goal of the asserts is to detect all these unexpected cases, that were kind of hidden (putting the dust under the carpet) until i added this. |
I think i have understood the problem. It happens when you try to login while having a non-default language in the front cookie. If you switch to the default language and try to login again you won't have the problem. But having a different language can happen. For a normal page this should lead to a redirection, but in the case of a POST request this is not allowed. I was first thinking a special case could be added for the login request having a "redirect_to" in the POST data. However, the problem seems even more general for the so-called neutral URL path, for which the language should not be enforced. The wp-login URL is part of that group. See function It is quite tricky to understand all the cases and how to handle them because some are done in the detection and others later on (needs a lot refactoring), but as i see it when the language is detected from the front cookie, we should not even try to redirect when the URL concerns a neutral URL. We should just take the language as it is. I hope this won't break other things but this would be inconsistent with the concept of neutral URL path. |
Fixed in master, testers are welcome to try this. |
Nice one, works now! Thanks for your quick fix!! |
@herrvigg I still see this error when I use wp-cli to run scripts on the wordpress installation |
@herrvigg same here seeing this in cli commands as a fatal error in 8.1 |
Hi there, just noticed an error when trying to log in to my WordPress admin:
This only happens when logging in. If I am already logged in, the error is not being thrown. WordPress 5.2.4, qtranslate-xt 3.7.1.
The text was updated successfully, but these errors were encountered: