Jump to:

3448 Posts in 1062 Topics by 738 members

Data Model Questions

SilverStripe Forums » Data Model Questions » SS2.4 DataObject Versioning error

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

Page: 1
Go to End
Author Topic: 221 Views
  • RyanTrout
    Community Member
    1 Post

    SS2.4 DataObject Versioning error Link to this post


    Having some trouble with versioning DataObjects in 2.4

    I have a Page with a has_many/has_one relationship with a DataObject.

    I've applied Versioning to the DataObject using;

    static $extensions = array(
       "Versioned('Stage', 'Live')"

    ... run dev/build and it appears to have build all the required tables and so forth.

    I can create a new record and save it, but when I edit a record and click 'Save', I get the following error;

    [User Error] Versioned::get_version: Couldn't get SiteTree.202, version 1

    202 is the ID of the Page the DataObject has a relationship with.

    I've run the SQL query in the debug dump, and it's returning 0 rows, which is why I imagine Versioned::get_version is throwing and error.

    The DataObject in question already had a few records, and I thought that may have been the cause, but I setup a new DataObject as a test and the same issue occured.

    Any help is appreciated.


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.