Hello there,

I just installed Bakery in a fresh Drupal 7 Multisite install. I've got two sites, domain.com and sub.domain.com, each one working on it's own database and with the default modules of a standard install (minus Overlay).

I configured Bakery following the documentation and added a $cookie_domain with .domain.com on both settings. That's also the value I'm using in Bakery's configuration. On the master I've got the "Is this the master site?" checked and http://sub.domain.com/ as the only slave.

When I try to log-in with the admin account I'm using on both sites to configure (same name, email and password on both) it works great on master and slave, everything goes as expected.

If I create a new account I can login on the master, but when I try to do so on the slave I get redirected to domain.com/bakery/login with an 'Access denied' error. On the slave's admin panel I can only see the admin user available. If I just go ahead and create a the user manually (maintaining user, mail and password) the SSO login works fine.

So I guess what's happening is that the users are not being replicated from master to slaves. Am I missing something here? I couldn't really understand how the communication between master and slave works, is all the data needed for the replication on the chocolate chip cookie? Do I need to configure something else?

Thanks for reading!
Angel.

Comments

Adirael’s picture

More info: If I log out on domain.com and try to log back in from sub.domain.com I get sent back to sub.domain.com/node but I'm not authenticated. If I then point my navigator to domain.com I'm logged in there with the credentials I used on sub.domain.com

I was able to access sub.domain.com and check the logs, I've got errors saying "Received response 404 from master with message". I'll try to pull the thread from there.

Dave Cohen’s picture

Same problem. I didn't specify a key on the master. Try typing anything for the key and see if you get past this. That form field should AFIAK be required.

Likewise the cookie domain.

Adirael’s picture

I reinstalled everything (new databases, downloaded all the code again for Drupal and Bakery) but still no dime. I've got the same key on master and slave (T5s9rUjA).

When I try to log in from the master it works, when I do so on the slave I end up on domain.com/bakery/login with an Access denied message and a 404 error for /bakery/login on the master.

Right now, the config it's something like this:

master

(Checked) Is this the master site?
Master site: 
http://domain.com/

Slave sites:
http://sub.domain.com/

Help text for users with synch problems:
Default

Seconds of age before a cookie is old:
3600 (default)

Private key for cookie validation:
T5s9rUjA

Cookie domian:
.domain.com (note the initial dot)

Supported profile fields:
Default (username, email)

slave

(unchedked) Is this the master site?
Master site: 
http://domain.com/

Slave sites:
http://sub.domain.com/

Help text for users with synch problems:
Default

Seconds of age before a cookie is old:
3600 (default)

Private key for cookie validation:
T5s9rUjA

Cookie domian:
.domain.com (note the initial dot)

Supported profile fields:
Default (username, email)

Thanks!

coltrane’s picture

Can you confirm that you've followed these steps in the troubleshooting section? http://drupal.org/node/1113196#sso

coltrane’s picture

Status: Active » Postponed (maintainer needs more info)

Let me know if you followed the setup steps in the documentation and still running into troubles. Otherwise I'll close this issue in a week.

nvalinski’s picture

I'm running into the same issue, but with only some users intermittently. Usually, the user is logged into the master site, but not logged into the subsite; upon trying to log into the subsite, they get redirected to an access denied page on the master site.

brandy.brown’s picture

This happens to me intermittently as well. I find that if I log out of the master site and log back in then I am able to go to the subsite, but I have to try twice (the first time just refreshes the page for some reason).

I might be way off, but I think it might be because of cookies length. It seems that the users who have this issue on my site have been logged in for a lengthy amount of time without use. I have made my cookies expiration longer. We'll see if that does anything.

joshbgosh10592’s picture

I second (actually, third) that I'm having the same issue as both nvalinski and brandy.brown. I'm trying to traverse between master and sub. When logged into master and not sub, access denied. When logged into sub, it all works fine.

Following the troubleshooting steps, which were moved to https://drupal.org/node/1906906, allowed me to log in as non-UID1 just be clicking a link on master, directing to sub. I did not have to actually log in. This was a new user that I created on the master (I didn't test before I cleared cache.)
However, when logged in as UID1 on master and navigating to sub, I am not logged in. When I try to log in, I am redirected to master with a 403 error (URL is master.org/bakery/login Hopefully the URL helps?
Looks like it's just an issue with UID1?

kpa’s picture

I've come across this with UID1 this afternoon - it's not a "bug" as such, but behaviour as designed.

The code is at the bottom of _bakery_taste_chocolatechip_cookie() - line 1088. If the user is UID1, or if has 'bypass bakery' permission, the user on master ISN'T logged out. This then means that the /bakery/login page is a 403 for a logged in user.

This only is an issue if master is logged in and slave is not.

joshbgosh10592’s picture

kap, How do we fix this then? I'm currently locked out of my sub website as UID1.

drumm’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing due to lack of response.