SIngle User Multiple Blogs issue
-
Successfully set up a network on localhost (with subdomains I might add, thanks Andrea_r :D)
Have created all the blogs I want, however, I would like to be able to access the dashboard of each blog with a single account (preferably the super admin account that I already have)
I add this user to each blog but when I attempt to access their dashboards from the ‘backend’ link in the sites listing I get taken to a login screen and entering the super admin’s UN and pwd simply loops me back to the login again. I don’t get the screen shake for an error it simply refreshes the login page with the url
http://subdom.localhost/wp-login.php?redirect_to=http://subdom.localhost/wp-admin/&reauth=1I’ve cleared my cache and cookies and tried it in Firefox, Chrome and IE all with the same result.
-
Doing a bit of digging I have discovered that there are no cookies being set for my local wp installation. could this be an issue? I have allowed cookies in all my browser’s settings but chrome seems to think that none are being set.
from reading through this trac page http://core.trac.wordpress.org/ticket/12142
I’m getting the feeling that this may be a cookie issue.the redirect_to and &reauth=1 added to the URI when logging in is, from what I can gather, only added if the login script can’t find a valid cookie. If I have no cookies and its not storing any its never going to find a valid cookie and so begins the loop. Does that sound about right?
Am I missing a setting somewhere in the config telling it to store a cookie?
Well that sounds like it.
I’m not aware of any settings in WP anywhere to force your browser to set cookies. (woudl be a huge security flaw I think)
Other than the generic ‘You can’t login to any site without cookies’… SO yeah, you DO need to have cookies to logic. And yes, it stores your passwords (encrypted). S’why I always tell people to dump their cookies and cache when they can’t log in 🙂 Sometimes the cookie gets munched.
Silly browsers. Cookies are a SOMETIMES food.
The thing is that cookies are allowed in the browser setting. I haven’t stopped it from setting cookies in any way.
I did note that there were a couple of wp-config.php settings available (not included by default) that let you specify a variety of options for cookies, but I’ve never needed them in the past (on non-network installs.)
I’m not sure how useful these would be though:define('COOKIE_DOMAIN', '.digwp.com'); // don't omit the leading '.' define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home').'/')); define('SITECOOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('siteurl').'/')); define('PLUGINS_COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', WP_PLUGIN_URL)); define('ADMIN_COOKIE_PATH', SITECOOKIEPATH.'wp-admin');I’ve used cookie domain when running cross sub-domain plugins but generally it’s not something you need to muck about with.
You said you’re using a local host? Are you doing any of Andrea’s funky chicken suggestions with redirecting a domain to local host? And can you try a different browser?
*squaaack* 😛
It should still take the cookies though – that’s how we roll locally here.
I had my local apache set up to do all that, and it /was/ working before I ran into this login loop problem.
My original setup, before I hit the login loop on even the admin account to get into the network dashboard, and the basis of the original question of this thread, was getting each blog in the network to recognise the super admin account as an administrator of the individual blogs. basically so I could post and change the settings of each individual blog with one account. I was originally hitting the login loop when trying to login to the backend of each blog with the super admin account but after a second clearing of cache and cookies it stopped letting me into even the super admin dashboard.
Each blog on the network was using its own subdom.localhost successfully, however since I’ve reinstalled wp a couple of times since then and kept hitting the login loop when trying to login to the superadmin dashboard. So I haven’t been able to set up the blogs again to test if all the subdomain settings (in vhosts etc.) are working correctly.
I’m not sure what you mean by ‘funky chicken’ suggestions I followed the advice of this thread if thats any help.
The whole thing has been tested multiple times in IE, chrome, and Firefox with the same results every time.
Forgot to link the thread that I followed to get the subdoms working:
http://wordpress.org/support/topic/wordpress-3-network-multisite-on-a-local-development-site?replies=49And like I said – this happens by DEFAULT. When you are logged in as the Super Admin user, you can get in everywhere. You do not need to login to any of the sub-sites. You’re already logged in.
I can’t see your local machine. It works for me. I’ve gone over every single step I know of.
most perplexing :/
Really dumb question (and I really doubt this is it since you’ve done multiple browsers). Have you just gone in and manually axed your cookies? All this changing and reinstalling, you might have corrupted one…
I’d uninstall it all, go back to a plain SINGLE site, and see if I can get in. THEN turn on the network, from scratch, and see if I can still get in. Basically onesye-twosie your way through.
I’ll give that a go.
Have reinstalled WordPress and am running a single site without any problems. I can log in and out without any difficulty.
However, upon rechecking that my subdomains are indeed working as expected I have found another issue. I have not changed the vhosts settings since the first time I tried it and it seemed to work. Now however instead of displaying the index.html of the directories the subdomains are mapped to they all display the front page of my blog.
This is an example of the settings I have in the vhosts.conf which has not changed since I first got it working:
<VirtualHost *:80> ServerAdmin postmaster@eve.localhost DocumentRoot "C:/xampp/xampp/htdocs/" ServerName eve.localhost ServerAlias www.eve.localhost ErrorLog "logs/eve.localhost-error.log" CustomLog "logs/eve.localhost-access.log" combined <Directory "C:/xampp/xampp/htdocs/"> AllowOverride All Allow from All </Directory> </VirtualHost>As to manually removing the cookies. I can’t find any indication of how to do this with chrome. Every page I look at simply says “open the options dialogue and push the button.” The only reference to cookies for Chrome that I can find is in the
C:\Documents and Settings\Owner\Local Settings\Application Data\Google\Chrome\User Data\Defaultfolder and its just a single file there is no indication that the cookies are stored individually anywhere. IE and Firefox are set to delete their cookies upon shutdown as I only use them for testing. I have ensured that this is in fact happening.I have not attempted to install the network again, I’m going to try and figure out the subdomains problem first and ensure that it is working as it should before I do.
ServerAlias http://www.eve.localhost
There’s the issue. WP doesn’t know that eve’localhost is a SUBdomain. Make it localhost.whateveryoulike.
Reinstalled Xampp completely and have set up subdomains again. they are now working correctly.
Without a WP install each subdom takes me to the index of the folder it is mapped to. which is as it should be.
Before install WP and set up the network, I have also set up the same subdoms with a main domain different from localhost (though pointing at the same directories) These are also working correctly. I will be using these domains going forward.
Next step. WordPress installation and single blog testing.
The topic ‘SIngle User Multiple Blogs issue’ is closed to new replies.