Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » HasManyComplexTableField - sub-URL

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: 1192 Views
  • haswalt
    Community Member
    16 Posts

    HasManyComplexTableField - sub-URL Link to this post

    Hi all,

    I have a small problem. I have created a custom module, and in that i have defined a one-many relationship.

    Now on the CMS page for the module i have added a HasManyComplextableField. This has worked fine.

    But when i click the add button the popup loads with the following message displayed:

    "I can't handle sub-URLs of a TemplatesAdmin object."

    TemplatesAdmin being the module class name!

    Anyone have any ideas why this is?

    My code is here:

    new LabelField('Bespoke data fields for this template:'),
                   $phTable = new HasManyComplexTableField(
                      new self::$tree_class,
                         'Title' => 'Placeholder Name',
                         'DataType' => 'Data Type',
                         'InputMethod' => 'Data Input Method'

  • haswalt
    Community Member
    16 Posts

    Re: HasManyComplexTableField - sub-URL Link to this post

    Fixed it!!

    For anyone else that hits this when creating custom code for CMS modules. Make sure the currentPageID is set correctly otherwise it will fail to populate the relationship and so you get this nice ambiguous error!


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.