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

Draft/Publish site not working?


Reply

4 Posts   2095 Views

Avatar
Landon

14 January 2010 at 6:59am Community Member, 7 Posts

Maybe I am doing something wrong, but this is what is going on...

I installed a fresh version of 2.3.4 and made a simple change of "Welcome to Silverstripe" to a h1 instead of just regular text and hit "Save", please note that I am not hitting "Save and Publish". Then I go to the draft site and the content is updated so I can proof it, and then I go to the published site (?stage=Live) and it's not changed on there... so far so good, right? Then I go to my live page (without ?stage=Live) and the changes I made to the draft site are there - live.

Is this a bug or am I missing something?

Avatar
Willr

14 January 2010 at 9:13am Forum Moderator, 5511 Posts

I'm pretty sure it might store the value of the current stage in a cookie / session. So if you're viewing the draft site then go to / then it will probably still be in draft mode.

You could double check what stage everything is in by having something like a debug statement in the Page.php init() function like

// mysite/code/Page.php

function init() {
...
...
Debug::show(Versioned::current_stage());
}

Then you'll be sure what stage you're on. The other thing that could be happening is the page template could be cached and carrying misleading values.

Avatar
Landon

14 January 2010 at 9:40am Community Member, 7 Posts

Willr -

That's what it was. I didn't realize it was pulling a cached version of the draft site.

Thanks!

Avatar
gour

15 June 2011 at 10:38pm Community Member, 22 Posts

Hello,

I'm pretty sure it might store the value of the current stage in a cookie / session. So if you're viewing the draft site then go to / then it will probably still be in draft mode.

I've similar problem while working/learning SS with the help of SS 'book' (I've just arrived at chapter 5 where the real fun begins)...I've added some text & image to my Home page, but when I try to see the 'Published site' with the: http://ss.local/index.php/?stage=Live link I get 404 (Page not found) error, although visiting http://ss.local/ renders OK?

I'm aware it might be something with the cookies/cache, but it makes development harder or more problematic than it should be.

Any hint what to do in order to be able to quickly check how the {draft,published} sites look like with the help of SS' back-end links meant for such purpose?

Sincerely,
Gour