Hi Dan:
That’s odd. My redirect_to_login()
method uses wp_login_url()
to generate the URI, which is the “right” way for me to do this. Perhaps some of your code or that of a plugin or template you’re using has a login_url
filter hook that changes the destination?
–Dan
I think this may have been a caching issue. We’ve disabled W3 Total Cache and the problem appears to have been resolved. We also have PAC byte code caching
It isn’t caching. The problem persists.
The redirect is happening prior to login. When a user is prompted to rest their password, they are sent an activation link. This link is to the main domain, not their subdomain / client domain.
They then enter the new password and go to login but they’re already on the main domain so are prompted to login there – but it’s the wrong domain and they have no access.
So, the problem happens before the redirect to login
Any ideas?
Hi Dan:
Weird. I’ll do some testing on my end when I get a chance and see what comes up, no promises as to when, sorry.
It’d be great you get a chance to put some debugging statements around the various login_url
filters and see what’s going on in your environment.
Thanks,
–Dan
Dan: Have you had a chance to debug what’s going on? Thanks, –Dan
Hi Dan, although it’s an irritating little problem (users always get stuck resetting passwords as they end up on the wrong site, resulting in phone calls to us) – we are too busy to debug this properly for now!
This is only a problem with our mult-site install.
Looks like it’s a WP bug that’s been around for a while, described here:
http://core.trac.wordpress.org/ticket/21352 (with patch)
We’ve applied the patch, redirects work ok now.
Hopefully this will be merged in the next WP version. We’ll need to check that ticket when we next upgrade as if it hasn’t been merged we’ll need to apply the patch again after upgrade.
ps thanks for your help though!
Dan: So glad you figured out what’s going on. Sad to see that simple bug fix has been lingering so long. –Dan
I just found I had this problem too and I’m on the latest 3.8 version of WordPress!
Thanks for sharing the link Dan