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:

Content Editor Discussions /

Forum for content editors and CMS users.

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

Serious Problem with Published and Draft Status


Go to End


3 Posts   1848 Views

Avatar
mtz

Community Member, 17 Posts

23 October 2009 at 3:45am

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

Community Member, 70 Posts

26 October 2009 at 11:11pm

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

Director::set_environment_type("dev");

Avatar
mtz

Community Member, 17 Posts

27 October 2009 at 11:55pm

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?