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


Reply


5 Posts   1141 Views

Avatar
Junglefish

Community Member, 104 Posts

25 August 2010 at 10:04pm

Edited: 25/08/2010 10:05pm

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?

jf/

Avatar
Junglefish

Community Member, 104 Posts

28 August 2010 at 2:12am

^^bump^^

Anybody able to help here?

Avatar
Mo

Community Member, 510 Posts

1 September 2010 at 9:51am

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?

Mo

Avatar
Junglefish

Community Member, 104 Posts

1 September 2010 at 7:23pm

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

Rock, lift, crawl under...

jf/

Avatar
Mo

Community Member, 510 Posts

1 September 2010 at 9:04pm

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 :).

Mo