Login | Forgot password | Register

X

What is OpenID?

OpenID is an Internet-wide identity system that allows you to sign in to many websites with a single account.

With OpenID, your ID becomes a URL (e.g. http://username.myopenid.com/). You can get a free OpenID for example from myopenid.com.

For more information visit the official OpenID site.

Jump to:

453 Posts in 122 Topics by 163 members

Upgrading SilverStripe

SilverStripe Forums » Upgrading SilverStripe » ManyManyComplexTableField Changed in 2.3

Ask questions about upgrading SilverStripe to the latest version.

Page: 1
Go to End
Author Topic: ManyManyComplexTableField Changed in 2.3 554 Views
  • Dig
    avatar
    Community Member
    24 posts

    ManyManyComplexTableField Changed in 2.3 Link to this post

    I've upgraded a site that uses a ManyManyComplexTableField on a frontend form. It worked well in the past (2.2.1?) but now fails with an error:

    Fatal error: Call to a member function Categories() on a non-object in C:\Program Files\xampp\htdocs\bigimage\sapphire\forms\HasManyComplexTableField.php on line 85

    After some digging around it looks as though it relies on $this->form->getRecord() returning an object (without checking if it does), I tried to set the record to the dataobject being represented and got further errors from Form.php.

    I'm not 100% sure on what its looking for and why so I'm not sure what to give it (if that makes any sense).

    Has the process for using ManyManyComplexTableFields been changed or has it been broken?

    Cheers,
    Nick

  • Dig
    avatar
    Community Member
    24 posts

    Re: ManyManyComplexTableField Changed in 2.3 Link to this post

    Ok I think I've fixed it, AFTER the form has been constructed you need to call loadDataFrom($object) where object is the dataobject that the manymanycomplexttable field represents. It still doesn't seem to properly load the currently selected items, but that could be due to being in the middle of a multiform.

    554 Views
Page: 1
Go to Top

Currently Online: becca

Welcome to our latest member: hcanning

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.