Jump to:

23355 Posts in 17734 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Draft/Publish site not working?

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

Page: 1
Go to End
Author Topic: 2028 Views
  • Landon
    Avatar
    Community Member
    7 Posts

    Draft/Publish site not working? Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Draft/Publish site not working? Link to this post

    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.

  • Landon
    Avatar
    Community Member
    7 Posts

    Re: Draft/Publish site not working? Link to this post

    Willr -

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

    Thanks!

  • gour
    Avatar
    Community Member
    22 Posts

    Re: Draft/Publish site not working? Link to this post

    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

    2028 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.