Did any one notice this ?
If you make a method like this:
public function viewermakesoffer() {
$page = new Page();
$page->Title = "xxxxxx";
$page->MenuTitle = "xxxxxx";
$page->URLSegment = "xxxxxxx";
$page->Status = "Published";
$page->write();
$page->publish("Stage", "Live");
return;
}
In a ContentController and execute it by calling the right url the versioning mechanizm will go bizzare and create a nullafied SiteTree object in the database.
But the method will work ok if you put it in plain Controller.
Filed it in: http://open.silverstripe.org/ticket/5596