Jump to:

23453 Posts in 18904 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Versioned objects do not work in ContentController

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: 491 Views
  • walec51
    Community Member
    16 Posts

    Versioned objects do not work in ContentController Link to this post

    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->publish("Stage", "Live");

    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

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.