Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » 3.1 GridField Error in getCMSFields

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

Page: 1
Go to End
Author Topic: 297 Views
  • cmc
    Avatar
    Community Member
    23 Posts

    3.1 GridField Error in getCMSFields Link to this post

    I have a GridField in my getCMSFields function for a subclassed page that's similar to the example in "Customizing Detail Forms" on this page of the documentation:

    http://doc.silverstripe.com/framework/en/reference/grid-field

    The code worked fine in SS 3.0.5, but with SS 3.1 I get the following error when I try to access a page of this type in the CMS

    Call to a member function stat() on a non-object in httpdocs/framework/model/DataObject.php on line 3192

    Any clues?

  • cmc
    Avatar
    Community Member
    23 Posts

    Re: 3.1 GridField Error in getCMSFields Link to this post

    In case anyone else runs into this problem, as best I can tell the API for GridField changed with v 3.1 See -

    http://doc.silverstripe.org/framework/en/reference/grid-field

    The doc must have changed since I first posted my question because this is the same url referenced below.

    I replaced my config setup for GridField in getCMSFields() with this line-

    $config = GridFieldConfig_RecordEditor::create();

    And defined my columns with the summary_fields property of the class used for the DataList and no longer have errors in the CMS.

    297 Views
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.