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.

Content Editor Discussions

Forum for content editors and CMS users.

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

Serious Problem with Published and Draft Status


Reply

3 Posts   1409 Views

Avatar
mtz

23 October 2009 at 3:45am Community Member, 17 Posts

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!

Avatar
rbquirke

26 October 2009 at 11:11pm Community Member, 70 Posts

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

Director::set_environment_type("dev");

Avatar
mtz

27 October 2009 at 11:55pm Community Member, 17 Posts

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?