Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Complex tables, Push error Options

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 927 Views
  • Hamish
    Avatar
    Community Member
    712 Posts

    Complex tables, Push error Options Link to this post

    Hi all,

    Just dipping my toes into Silverstripe for the first time. To learn, I'm trying to create a very simple 'job applicants' database. I've got an ApplicantsHolder page which can have a number of Applicant DataObjects (ie 1 to many).

    The applicant object has two text fields (FirstName, LastName) and a 'CalendarDateField' DateofBirth.

    So far so good - it builds fine and I can create the page and add applicants to the complex field in the CMS, however the date field doesn't show up in the table, and when I try to edit the record I get the following message in the popup:

    Fatal error: Call to a member function push() on a non-object in C:
    \lighttpd\htdocs\sapphire\forms\ComplexTableField.php on line 264

    Any clues? Cheers

  • Blackdog
    Avatar
    Community Member
    156 Posts

    Re: Complex tables, Push error Options Link to this post

    Post your code

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Complex tables, Push error Options Link to this post

    Ah, found the issue myself.

    I was calling 'getCMSFields_forPopup' in the table constructor, but had the function getCMSFields() instead of getCMSFields_forPopup() in the dataobject. Using the correct name solved the problem.

    Thanks

    927 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.