When I log out from my site, the home page still looks as if I was logged in - with navigation menu, edit links, etc. But I am definitely logged out - If I go to any other page, or try to use the links, I have "anonymous" rights, not admin. This is happening on two different sites running 6.13
Here's what's happening:
1. log into the site
2. click on "logout"
3. I am redirected to / but it still looks as if I am logged in.
4. If I click on an admin link on the home page (e.g. "Administer" or "Create Content") I get an "access denied" error
5. If I view the home page as either node/1 or /home, it shows me as logged out correctly.
It appears that for some reason, only the page / is getting cached in the "logged in" state and not getting updated when I'm logged out.
I looked but did not see another issue report for this problem.
thanks
Comments
Comment #1
halfabrain commentedHi Celadon
I found the solution to this through the Drupal forum but can't find it again! But anyway, to fix it, locate the bootstrap.inc file in the includes folder (includes folder is at the root of your drupal site) find the line that says
header("Cache-Control: store, no-cache, must-revalidate");
and replace it with:
header("Cache-Control: no-store, no-cache, must-revalidate");
you're simply changing the store to no-store.
This solution is hacking Drupal core so is frowned upon, but I couldn't find another solution without doing this. Maybe one of the Drupal demi-gods will enlighten us further!
And if you're interested, the problem and solution originated from here: http://www.sriramkrishnan.com/blog/2007/06/firefox-and-ie-deal-with-no-c...
H
Comment #2
pwolanin commentedseeing this in a more recent Drupal 6 install - may be an issue in 7 too.
Comment #3
smptebars1 commentedI also have this issue. Exactly the same as you describe it. Everything worked fine until today. I updated a few modules. They did not mess anything up on my test subdomain but has caused this issue on the main domain. I updated, mollom, global redirect, link, ajax_load. Hopefully someone can point us to what may cause this. I do not want to modify code and create custom code. Also, by not storing cache, causes a greater load on the server, I can't do that with a site as big as mine.
Thanks for any advice
Comment #4
DavidMichael2222 commentedI had the same problem after I updated to Drupal 6.26 and made the change that halfabrain suggested in #1 and it solved the problem. I did try numerous solutions that came up while searching under "access denied" to no avail.
Prior to this I could log in, click log out and the screen would look as if I was still logged in while the sessions table showed that I had logged out. If I clicked on the log out button again I would get an access denied error and I could not get the front page to refresh and display the log in menu.
I am not comfortable with changing the code in this way, but it did work.
Can anyone add any light to this?
I ask because the solution above was posted three years ago and I am perplexed as to why that was not changed in one of the many releases since 2009.
Thanks for any light you may shed.