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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Public site redirects to login screen


5 Posts   1101 Views


25 August 2010 at 10:04pm (Last edited: 25 August 2010 10:05pm), Community Member, 104 Posts

Odd one this.

In my dev installation, the homepage of the public site is being re-directed to the CMS login screen. It has only recently started doing this after months of no problems.

It doesn't do this in my production installation, and the codebases are the same.

I've checked the Access tabs of the main 'site' node and the homepage beneath it. The 'site' node says "Anyone can view pages on this site", and the homepage inherits its permissions from its parent.

Other pages on the site can be accessed without problem, it's just the homepage that has issues.

I've re-built, flushed, cleared caches and pretty much kicked the PC, but can't stop it re-directing.

Of course, if I log-in to the CMS, it allows me to see the homepage.

Anyone got any ideas?



28 August 2010 at 2:12am Community Member, 104 Posts


Anybody able to help here?


1 September 2010 at 9:51am Community Member, 509 Posts

What version of SS are you running?

You don't happen to have something like:

if(!Member::currentUser()) {
//Some redirect code here

In the init() method on your Page_Controller class do you?



1 September 2010 at 7:23pm Community Member, 104 Posts

<totally embarrassed>
Nope, I finally figured it. The page that wouldn't show was embargoed...
</totally embarrassed>

Rock, lift, crawl under...



1 September 2010 at 9:04pm Community Member, 509 Posts

Ha ha, nice!

We all do things like that. The amount of hours I have wasted trying to chase down things that were glaringly obvious in the end :).