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:

General Questions /

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

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

Draft/Publish site not working?


Go to End


4 Posts   3286 Views

Avatar
Landon

Community Member, 7 Posts

14 January 2010 at 6:59am

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

Forum Moderator, 5523 Posts

14 January 2010 at 9:13am

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

Community Member, 7 Posts

14 January 2010 at 9:40am

Willr -

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

Thanks!

Avatar
gour

Community Member, 22 Posts

15 June 2011 at 10:38pm

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