Rename Login breaks logout funtion (host set to WP_HOME)
-
I can reproduce this issue in a couple of sites.
My WP_HOME and WP_SITEURL differ from each other. With AIOWPS and the “Rename Login Page” enabled, the logout link on the WP admin bar breaks. Instead of the WP_SITEURL, the host is set to WP_HOME, which can’t handle the logout.
Disabling the “Rename Login Page” feature fixes the issue.
Is this a bug or the expected behaviour?
Related issue: https://wordpress.org/support/topic/logout-issue-redirect-to-127-0-0-1/
Thanks in advance!
-
Do you have Cookie Based Brute Force Prevention enabled as well.
If so, you cannot use this with the rename login page function.Hi vupdraft,
> Do you have Cookie Based Brute Force Prevention enabled as well
No, just Rename Login Page.
From the linked post, the Cookie Based Brute Force Prevention feature seems to cause some similar issue. That’s why I mentioned it.
- This reply was modified 1 year, 9 months ago by lesandles.
Our development team are just trying to replicate the issue.
Thanks @vupdraft. Let me know if I can be of any help.
Thank you, that’s very kind. We will let you know
I have tried replicate issue but can not.
can you please provide some more details to check issue in more detail?
what values you have as WP_SITEURL and WP_HOME?
Also if you have configured the WordPress inside a directory of Home url. you need to follow some below instructions. Please cross check and let us know.
https://wordpress.org/support/article/giving-wordpress-its-own-directory/#method-ii-with-url-change
I started a demo instance where I reproduced the issue. Freshly installed WP 6.0, all other plugins removed, no inactive themes, current AIOWPS. What’s the best way to give you the URL + credentials?
> what values you have as WP_SITEURL and WP_HOME?
In the demo instance I used
https://throwaway-frontend.mydomain.com
for WP_HOME and
https://throwaway-backend.mydomain.com
for WP_SITEURLand could reproduce the issue defining them in the options or directly in the wp-config.php. Even the strings in the admin area are broken
https://imgbox.com/XuxM2UUE
https://imgbox.com/NzqDzmngBut…
the issue went away a couple of times. No interaction from my part other than enabling/disabling the “Rename Login Page” feature. Seems like some sort of caching? After enabling the feature and not seeing the bug, I could see it again after reloading the page a couple of minutes later.
> configured the WordPress inside a directory of Home url
Not the case I’m afraid. We only have instances in the domain root.
- This reply was modified 1 year, 9 months ago by lesandles.
Hi @lesandles
Thanks for your input based on that I try to replicate but can not find that login / logout breaks type issue. Login / Logout works.
Step 1 : Settings shows set as different url pointing to the same WP root installed directory.
http://updraft5-backend.test
http://updraft5-frontend.testStep 2 : AIOWPS – Rename login
It gives front end url that is right http://updraft5-frontend.test/?custom_login.
And it works for both login and logout.Login works
https://imgbox.com/ZBNXyrrHLogout works
https://imgbox.com/BpYpYqt7Note : I will discuss with here AIOWPS team if we need to change the link to http://updraft5-backend.test/?custom_login but page view works like this http://updraft5-frontend.test/?page_id=2 so it seems ok to me considering it as login page.
You said : “issue went away couple of times. enabling the future you can not see and on reload appear again after it might be cache issue”
If It is cache though login / logout should work as custom_login and extra params for logout passed.
Regards
Hi @hjogiupdraftplus, thanks for the quick answer.
From what I see, you can reproduce the issue too: the backend URL is replaced with the frontend URL. Only that in your case, the frontend can handle the logout.
Our frontend site doesn’t execute any PHP, it is just a static site generated from the data in the backend. I mentioned it briefly on first post but I should have stated it more clearly. We need to keep the frontend URL as WP_HOME for the static site generation to work correctly and to get the correct links when working on the admin area in the backend.
From the WP documentation I understand that this is the right way to do it:
https://developer.wordpress.org/reference/functions/home_url/
https://developer.wordpress.org/reference/functions/site_url/Shouldn’t the WP_SITEURL always be used for login/logout?
Hi @lesandles
Ok let me discuss here with team.
But can you please cross check Pages > Particular Page > View have also any issue in this context means WP HOME set url do not runs php front end of wordpress site ?
@hjogiupdraftplus I’m not sure if I fully understand your question, but the link in “View” is the one we expect: the permalink in the frontend, where the end user will visit the page, not the backend. So no issues there as far as I can tell (with “Rename Login Page” activated).
I am asking here do you have any issues if you create a page in back end and view it?
Though even the plugin AIOWPS is not installed or installed it does not matter.https://imgbox.com/ImY3JSE7
https://imgbox.com/nx1qtG4kBecause pages uses WP_HOME url for view link In page list of back end.
You said that your front end site is only static site no php ( or htaccess to run php form another location ) so according to me Page view link should also not work.
It is WordPress functionality even if you do install AIOWPS plugin or not.Regards
- This reply was modified 1 year, 9 months ago by hjogiupdraftplus.
In the case of the static site as frontend, we build it using the WP_HOME and permalink structure provided by the backend. The resulting frontend URLs match the ones in the “View” link 1:1, so it’s a perfect fit for our use-case.
Another example I’ve worked with is the frontend being served by WP directly on the main domain but the backend hidden behind a subdomain with basic auth on top of it. In this case it’s also important that the WP_SITEURL and WP_HOME aren’t mixed, because everything under the admin area is re-routed by the webserver and doesn’t exist under the main domain.
can you please download below plugin version zip and install it?
https://www.dropbox.com/s/h4w8dkyesa6ffqb/all-in-one-wp-security-and-firewall.zip?dl=0
it should solve your issue. if still any issue let me know.Note : Still we are reviewing this change in detail and if everything fine will update it in our next version.
Dear @hjogiupdraftplus, I checked our backend with the new version, everything seems to be working correctly. I also ran our build pipeline for static pages against that backend and it went through without any issues.
Thanks a lot for your time. If there’s anything else you need me to test drop me a line, I’d be happy to help.
- The topic ‘Rename Login breaks logout funtion (host set to WP_HOME)’ is closed to new replies.