Hi!
The Edit-Form for my ContentDataObject (in the DataObjectManager) works fine, but if I want to save it, following exception is thrown:
[User Error] Uncaught Exception: Object->__call(): the method 'setbyidlist' does not exist on 'DataObjectSet'
POST /admin/EditForm/field/CurrentContent/item/47/DetailForm
Line 515 in ~/sapphire/core/Object.php
Source
506 case isset($config['function']) :
507 return $config['function']($this, $arguments);
508
509 default :
510 throw new Exception (
511 "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config, true)
512 );
513 }
514 } else {
515 throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'");
516 }
517 }
518
519 // -----------------------------------------------------------------------------------------------------------------
520
521 /**
Trace
* Object->__call(setByIDList,Array)
* DataObjectSet->setByIDList(Array)
Line 143 of CheckboxSetField.php
* CheckboxSetField->saveInto(EventDataObject)
Line 884 of Form.php
....
I have follow DataObjects
class ContentDataObject extends MagazinDataObject {
static $db = array (
);
static $has_many = array (
);
static $many_many = array (
"Categories" => "CategoryDataObject",
);
public function getCMSFields_forPopup() {
$fields = parent::getCMSFIelds_forPopup();
$fields->push(new DateField("ArchivDate", "Archivierungsdatum"));
$fields->push(new DropdownField("ClassName", $this->fieldLabel('ClassName'), $this->getContentTypeClasses('ContentDataObject')));
$contentList = DataObject::get('CategorizationComplexDataObject');
// $fields->push(new CategorizationSetField("Categories", "Kategorien", $contentList));
$fields->push(new CheckboxSetField("Categories", "Kategorien", $contentList->toDropDownMap()));
return $fields;
}
...
}
class CategorizationDataObject extends MagazinDataObject {
static $db = array (
);
static $has_one = array(
);
static $belongs_many_many = array (
"Contents" => "ContentDataObject",
);
public function getCMSFields_forPopup() {
$fields = parent::getCMSFields_forPopup();
$fields->push(new DropdownField("ClassName", $this->fieldLabel('ClassName'), $this->getContentTypeClasses('CategorizationDataObject')));
$fields->push(new DropdownField("MagazinPageID", "Single View Page", $this->getMagazinPagesForDropDown()));
// $fields->push(new TextField("Author", "Autor"));
return $fields;
}
...
}
Any ideas or hints?
Cheers,
Malte