-
Notifications
You must be signed in to change notification settings - Fork 65
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
Endless redirect loop on some subsites #41
Comments
Same issue here. @humanmade please advise |
In my case, the redirect loop was happening because I changed the main "Domain" field under the "info" tab. When I put this back to the default subdomain value, and instead added the custom domain under the "Aliases" tab, everything started working. |
Apologies for the breakage here. We've been working on improving the plugin based on our usage patterns, but looks like there might have been some bits missed in the process. @tcrsavage Looks like there's a regression here, do you have time to look into it? |
I can confirm I have this exact same issue. One site seemed OK. The other was looping. |
@tcrsavage is there any chance you have the time to check it out? I believe I need to upgrade this plugin as some people say they get 404 pages when visiting URLs on my WP install, that are working on my end, but am reluctant to upgrade because two of my sites will break for the reasons above. |
@robrecord sorry should have left a comment here. Pushed this issue over to @rmccue due to workload. We're all hands on deck at the moment with a few big product deployments, sorry for the delay! |
No problem and thanks for the update! Appreciate the work you guys have done. |
Looking into this issue now, and I can't say I really understand what's happening. I'm thinking the non-www alias could be the issue though, as Mercator treats www and non-www the same when searching. Try removing the non-www and see if that helps? If not, can you give a step-by-step process to replicating the issue? Alternatively, a quick description of what's happening plus the data from your |
I have a similar issue. I try to log in to my subsite's dashboard and it starts an endless chain of forwarding, navigating to this url with the key and nonce changing each attempt: My root site/admin is the only site and dashboard I can successfully navigate to. This is in a production environment. |
If I logout and go to my subsite's domain, the html loads, but none of the images, scripts or styles load. I get 404 errors for the url: The following urls work and load the image appropriately: It doesn't like that subfolder name in the url. |
I resolved this by disabling SSO, resetting my network's .htaccess rules and clearing my cookies. |
I also have this problem. To recreate the problem:
|
+1 for fixing this |
Hi @scarstens
What issues have you found? |
issues, as I mentioned on the other github issue you commented on, relate to how WordPress links to wp-admin URL's. |
Sorry @rmccue - I didn't have time to troubleshoot as you asked of me last year. Though I can now confirm that leaving subdomain as site URL resolves the issue. (I perhaps hadn't cleaned caches/replaced wp-config salts last time I tried it.) |
What if one didn't want to leave the Site Address as the unmapped domain? I can confirm this issue is happening in some instances unless I leave the subdomain as the Site Address. Perhaps I'm misunderstanding how this plugin could potentially work. This is what I'm imagining: I have a Multisite network, on which I want to offer support for custom domains. Since WP 3.9, I'm able to change the Site Address to whatever I want, and as long as I sort out the authentication cookie, I should be good to go. See #3 and @rmccue's comment:
Because he's saying you "could" set the alias to the old one, I read that to mean that I don't have to. Mercator then becomes a mechanism for me to enable cross domain cookie support through the SSO functionality, allowing my users to navigate across the network regardless of the domain. If alternatively I want to have multiple domains pointing to the same subdomain, I can also accomplish this through aliases. So conceivably I could take an unmapped domain from my multisite (eg site1.domain.com) and delete the unmapped domain from the Site Address field in settings, replacing it with a new domain (eg. betterdomain.com) along with a second alias in the alias tab (eg. otherbetterdomain.ca), and allow people to find my site through two different domains (SEO issues aside). Are others experiencing this redirect loop? Any thoughts on a fix? Am I misunderstanding the use-case for this plugin? |
@mrjarbenne we have seen the same issue and were only able to resolve it by making the primary domain in wp_blogs be a subdomain of the primary domain (sitea.site.example.com) while our mapped domain is (sitea.example.com). We don't have full organizational control of all of example.com only site.example.com which is why we have the multi-level subdomains. sitea.site.example.com only exists in the wp_blogs table for us. We search replace for the mapped domain otherwise we end up with CORS issues. This setup has the following issues for us:
We are using mercator for the SSO feature as well, and would love a resolution to this. Happy to submit a PR, but also want to make sure we are using it correctly. |
@jjeaton to cut a long story short... I think the problem is that COOKIE_DOMAIN does not get defined here since this change. I just made sure, that COOKIE_DOMAIN gets defined again. I did not take a deeper look into the code. But mapping now works as expected. At least for my setup. |
If I read you resolution correctly you lifted the www.UNIQUE-DOMAIN.com from the mapping of site 2 and set it to be a subdomain of the root (site 1 domain). I am betting you're on WPE btw. So you ended up with unique.mgmt-site.wpe.com because wpe hosts ALL multisites from their own domain. Then you used the mapping to map www.UNIQUE-DOMAIN.com as an alias for the unique.mgmt-site.wpe.com (sub-subdomain). I am still not certain that this would resolve my issues but I could set unique.mgmt-site.wpe.com as the origin for my CDN where www.UNIQUE-DOMAIN.com actually lives. 🤔 If that works it's not the end of the world. |
On the latest release 306176a - compared to what I had before I pulled (0f07fc6), I get the following behaviour.
Two of my subsites go into an endless redirect loop between their proper www.domain.com address, and something like rootsite.com/wp-admin/ajax.php?page=mercator-sso (could be that or page=mercator-sso-something) with a few other (long) arguments in the query string. The other sites are fine.
My setup: I have several sub-sites on a multisite network. Each sub-site is accessed by its own domain; I have the sub-site's domain www.domain.com as the sub-site URL set in network site settings (info tab), and an alias for non-www domain (active) and domain.rootsite.com (active). The two sub-sites that have a problem have domains that are hosted by hosting provider 'B' (whereas the rest of my sites are hosted by provider 'A'). I have confirmed with domain provider B that there are no problems with the DNS or anything their side.
I have tried removing all cookies. I have tried using private browsing mode in safari.
As these are production sites, I had to use git to hard reset.
+1 vote for tagging stable releases please :) My clients are counting on it.
The text was updated successfully, but these errors were encountered: