Removed all plugins that called anyfunction in pluggable.
Still unable to log out from a mapped site. Still get redirected when trying to edit a page/post.
Removed all plugins that called anyfunction in pluggable.
Still unable to log out from a mapped site. Still get redirected when trying to edit a page/post.
That's bizarre! Any chance you could use error_log() to try and track down where it goes wrong? A good place to start would be redirect_admin()
I'll give it a shot, but I've got a few other things to do today.
Is there anything that is stored in your db tables for this that would cause lingering issues? I checked the id being varchar, but I'm looking at things like the hash. If I just clear the data or even drop the tables, the plugin should just recreate them, right?
Yeah, it'll recreate the tables if you go to the site admin page. The logins table should be blank (because the remote login key is deleted when the user logs in).
Interesting.
Playing with the error_log in the redirect_admin() as suggested.
function redirect_admin() {
error_log("entered redirect_admin()", 1, "email");
if ( get_site_option( 'dm_redirect_admin' ) ) {
// redirect mapped domain admin page to original url
error_log("dm_redirect_admin is set to 1", 1, "email");
$url = get_original_url( 'siteurl' );
error_log("set url ", 1, "email");
if ( false === strpos( $url, $_SERVER[ 'HTTP_HOST' ] ) ) {
error_log("Redirecting to original url", 1, "email");
wp_redirect( trailingslashit( $url ) . 'wp-admin/' );
exit;
}
} else {
// redirect original url to mapped domain
error_log("dm_redirect_admin is 0", 1, "email");
$url = domain_mapping_siteurl( false );
if ( $url != site_url() ) {
error_log("Redirecting to mapped url", 1, "email");
wp_redirect( trailingslashit( $url ) . '?dm_gotoadmin=1' );
exit;
}
}
}
Redirect Administration is checked. Already logged in, and just clicking a link to site admin.
I get 3 sets of:
entered redirect_admin()
dm_redirect_admin is set to 1
I never see "set url".
Also, should the if block on line 298 have curly braces?
I'm having a problem with new dev version (0.5) after updating the 0.43 version (which works fine). After installing the dev version the site works fine except wp-admin. It seems to go into some infinite redirection loop when I try to get to the login page.
When I change back to 0.43 version everything seems ok again.
Using 2.8.6 WPMU version with about 10 blogs.
Not a biggie since I just had to reinstall the 0.43 version and everything was OK again.
I have a separate testing setup for WPMU and I will try to recreate the problem there so you can check it out yourself.
I love the domain mapping plugin and the 0.43 ver works just fine in my OSX server 10.6 with standard components.
I'll get back to you with details on testing environment IPs etc.
kgraeme - you're right about the curly braces. Checking the other places I added "exit" now.
svn up - I fixed the problem kgraeme found with the curl braces.
ben - the latest fix may help you too.
I only have a live server, and have some live mapped domains, so have not tested this version.
But was wondering if anybody has used/tested the new version on a buddypressenabled MU site? Does it create any problems or solutions?
With the old version the only problem was that the login-link logged users in the MU site, redirecting the user to the mapped domain site, but not logged in for it :)
Not sure from the description in the first posts and the follow-ups, but is this issue resolved in the update?
Cheers, Bike
latest trunk seems to resolve all the issue I was experiencing except if I have a domain mapped, and then remove that domain, clicking anything else in admin, sends me to the newsignup=removed_mapped_domain
Can now edit posts, and can view admin with redirect to original domain unchecked.
miklb - That's because your dashboard is on the domain mapped domain. The browser should of course redirect to the original domain. Will fix tomorrow. (Thanks!)
Still seeing problems. I'm going to work on getting a fresh install on a new domain set up.
Line 101: Remove extra single tick.
echo "' /> Redirect administration pages to original blog's domain<br />";
to
echo " /> Redirect administration pages to original blog's domain<br />";
Did a complete from scratch install of MU. New DB. New files. No plugins. Configured in subdirectory mode.
dm_redirect_admin 0
dm_redirect_admin 1
On my main test server (which is our production config mirror), I'm still getting most of the other issues I've mentioned (like not being able to log out). I had dumped the ldap plugin and anything else that was a suspect, but time to do more digging to find what's misbehaving.
Fixed the tick bug above, thanks.
I also changed the dashboard redirection so it redirects to the primary domain, whether that's the original blog url or not.
Are you using the main blog for testing? On a folder install I noticed the /blog/ prefix gave a 404 when viewing single posts. I may just disable mapping on that blog in that situation.
Few more updates:
1. The plugin will redirect to the same url on the new domain now.
2. Updating the admin page redirects so an update message is shown and it can redirect to a new domain if necessary.
I can confirm the 404 on viewing posts on the main blog. I had tested against an unmapped blog but not the main blog, sorry.
With the latest update on my clean server I'm a bit reticent to say everything (else) appears to be working. Gimme a bit, I'm sure I can come up with something.
Crap. I had hoped that I was kidding about finding more bugs.
When dm_redirect_admin 1
With IE:
It appears to upload and then hangs instead of going to the picture details screen and "HTTP error" text in red appears on the page.
With FF:
After uploading, it displays the WordPress login screen in place of the picture details.
1. Add new post
2. Add title
3. Click into visual editor.
FF shows "Saving Draft" in the tinymce status area. IE shows "Error on page" in browser status bar. Error is "Permission denied" for load-scripts.php.
The two of these bugs together looks like there's something with login state.
I think the issue with the widgets, saving drafts, etc. is that the ajaxurl is the mapped domain rather than the original domain and the nonce fails because the domains don't match.
The svn has been updated with a patch for the widgets, drafts, etc.
wpmuguru - works nicely! Just made a test post with an uploaded image! Really close to release now.
I think the one remaining problem is with the main blog on folder installs, the blog doesn't redirect /blog/ posts properly. I'll disable domain mapping for this blog in the next version.
Hopefully we can get a new version out in the next day or so, so please try out the latest version from trunk! (Please kgraeme, you're great at finding bugs!)
Another update (hopefully the last)
- Domain mapping is disabled on the main blog in a non-VHOST install.
All my testing shows it working as expected.
Wait, you want me to jinx it?
Okay, here goes. So far, other than the main blog posts as you found, I don't see any problems.
That's on my clean mu install.
Woo! Thanks :)
So playing with fire, I tried it on my troublesome test server that is a mirror of our production config.
Amazingly, almost everything works! Login/out, posts, etc all good regardless of dm_redirect_admin. What's really odd is that posts on the home blog even work. Dunno why they would work on my "dirty" test server and not the clean one.
I also solved a problem where my Firefox on my main development machine wasn't correctly showing logged in state for mapped blogs. I could log in fine, but when I viewed the mapped site anything that called is_user_logged_in() (meta widget, for instance) was not reflecting the logged in state.
Turns out as a security thing I had changed the network.cookie.cookieBehavior flag to only accept cookies from the originating server.
I knew there had to be a pebkac in there somewhere!
Hello donncha.
Thanks for this plugin. I've tested your dev-version, because my blog is running with subfolders. I have installed it and have serveral domains (all with A records pointing to the right IP Adress and the same nameserver as the main page) but when I now come up using the plugin my browser keeps running and running (e.g. tokio-hotel-tickets.de) and the point out "to many redirects"...
Where is the problem? Can anybody help?
Update: Looks like I did a mistake while configuring the domain tokio-hotel-tickets.de (linked it to: http://www.livedabeisein.de/wp/tokio-hotel-tickets/) and changed it to "/wp/" because it belongs to the same server.
Now I have the problem that it comes up showing no pictures (because the link to the picture is now wrong - ok, this is easy to correct) and that I cannot display pages (e.g. tokio-hotel-tickets.de/about).
Help on this?
Update 2: Ok, I changed the permalink settings to "default" and now pages are working fine.
I edited the urls to the images and this works for me as well.
One problem remains: I can't go to the admin panel... I am redirected to the front page of the blog every time.
Seems like the server cannot handle this url:
http://robbie-williams-tickets.de/?dm_gotoadmin=1&back=%2Fwp-admin%2Ftools.php%3Fpage%3Ddomainmapping%26updated%3Dadd