Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

can't view the website after logging out while in draft mode

Go to End

2 Posts   1900 Views


Forum Moderator, 1391 Posts

6 November 2008 at 1:36am

Edited: 06/11/2008 1:41am

When I log out of the backend after viewing my site in draft mode, I cannot access the live website as an 'anonymous user': requesting the root of my website now redirects me to the login screen. I can force access by manually adding ?stage=Live to the url - which could be by design but then I wouldn't be so happy about it :-(

In Mozilla (XP, v3.0.3) though, even after that, just requesting the root of the site won't work. Flushing sometimes helps... The only way to avoid this is by restarting the browser or removing the PHP session ID from the cookies list.

Could this maybe be altered so that logging out automatically resets the php session id values? Please dont think I don't appreciate the good work though - because I really do :-)


Forum Moderator, 1391 Posts

6 November 2008 at 4:27am

Edited: 06/11/2008 4:29am

To anyone who's interested: I created a temporary (I hope) solution in the function logOut() (sapphire/security/Member.php line 174) by adding an extra line of code:

function logOut() {

	# my solution: clear reference to Stage

	$this->RememberLoginToken = null;
	Cookie::set('alc_enc', null);