Hi,
I have a BlogPost class, which has the relationsship:
static $belongs_many_many = array(
'Tags' => 'BlogTag'
);
and a CheckboxSetField of BlogTags is added in getCMSFields():
$dataSet = DataObject::get('BlogTag');
if( $dataSet ) {
$theCheckboxFieldSet = new CheckboxSetField(
'Tags',
'Tags for this blog post',
$dataSet,
$idList);
$fields->addFieldToTab('Root.Content.Tags', $theCheckboxFieldSet );
}
In the CMS, is I click to the history of any BlogPost page, I got the error:
Fatal error: Cannot use object of type DataObjectSet as array in /var/www/xebidy/sapphire/forms/CheckboxSetField.php on line 130
When I comment out the CheckboxSetField in the getCMSFields(), I can access the history of BlogPost. Do I do something wrong, or is this a SS bug?