My guess is that this problem is not easily solvable. But perhaps someone can point my in the right direction.
The problem.
When I log into my drupal installation (with the drupal gallery module installed), and I go to the gallery page, for some users the wrong user is logged into to gallery.
For example I log into drupal as "cooluser"
I look at the gallery page and I am logged in as "notsocool"
In addition the association is always the same way.
x gets logged in as y, and y gets logged in a z, every time.
I'm running gallery 2.02
Gallery module from drupal (from cvs, but the standard had the same problem)
Drupal 4.6.5
Thanks as always for your help.
.ps other than that everything works fine.
Posts: 189
This can happen if "cooluser" is the admin user (uid=1) in Drupal but originally this username was not present in G2. In this case, the oldest admin in G2 is used to make the G2-Drupal user association, which would be "notsocool". Is this what happened? This should only happen with one user though.
Posts: 12
No, in fact when the admin user logs in it works fine. It is with a whole bunch of the other users that it does not work.
On a related note, when I try to create a new user in drupal, I get a fatal error saying that it could not create the user in gallery. However, when I check the gallery Database, the user has been added successfuly, and I can log into the main gallery installation. And then I can log in successfully into drupal, but the problem described in the first post occurs.
And for completeness the errors given in watchdog are as follows:
And
As always, thank you for your help. I've been pulling my hair out on this one.
Posts: 189
I had a problem similar in some ways when I was using multi-site Drupal and G2 and specified the wrong G2 location for one of my sites so that it started using the wrong database. Unlikely, but you never know.
If you can check/change the Gallery database then you should be able to fix up your users manually (back it up first!) assuming you do not have many. You need to change the g2_ExternalIdMap entries so that g_externalId (=Drupal User ID) is correctly aligned with g_entityId (Gallery User ID) which you can find from the g2_User table. Once it's working, try creating a new user and see if it starts to work. Somewhere it sounds like it has got confused, but I have not seen this on a normal installation of gallery.module.
Posts: 12
That was in fact the problem. THANK YOU!
I kept looking for some table that did that, but I had been unsuccesful. I'm a happy gallery user again .