Jump to:

517 Posts in 247 Topics by 260 members

Content Editor Discussions

SilverStripe Forums » Content Editor Discussions » Serious Problem with Published and Draft Status

Forum for content editors and CMS users.

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

Page: 1
Go to End
Author Topic: 1312 Views
  • mtz
    Avatar
    Community Member
    17 Posts

    Serious Problem with Published and Draft Status Link to this post

    i´ve installed an older Site in SS 2.2 on webserver now, and when i save a new page or edit an existing page it will be published.
    Even when i save it in the draft-site with save button.

    Only when i add ?stage=Live to the URL I get the Live Version even when I`m loggedout.
    My Client and anyone else in the World gets the Draft Site by calling the "native"-URL www.XXXX.de
    It makes me crazy!

  • rbquirke
    Avatar
    Community Member
    70 Posts

    Re: Serious Problem with Published and Draft Status Link to this post

    do you have an entry in your _config.php file similar to this?

    Director::set_environment_type("dev");

  • mtz
    Avatar
    Community Member
    17 Posts

    Re: Serious Problem with Published and Draft Status Link to this post

    No, i have no environment_type set.
    But i have a little Custom controller that gets ChildPages this way:

    $mypage = DataObject::get_by_id("Page", $pageID);

             $children = $mypage->Children();
                   
                   
                foreach($children as $child) {
                         $target = $child->ID;
                         $count++;

                         
                         $ImageButton .= $child->naviImage($target, $first);
                }
             
                return $ImageButton;

    in my case $mypage->Children(); retzrns the whole SiteTree with unpublished Sites on the ?stage=Live
    How can I prevent that output in the foreach?
          

    1312 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.