Hey guys,
I´m following this little tutorial http://doc.silverstripe.org/framework/en/trunk/reference/uploadfield about extending the uploadfield in SS3.
Everything works really nice in front- and backend, but if I want to start the filemanager in the backend, I get this crazy error:
Fatal error: Call to undefined method ProductDetail::setSourceQueryParams() in /Applications/MAMP/htdocs/moebel-luebbering3/framework/model/DataList.php on line 678
class Product extends DataObject
{
...
static $many_many = array(
'ProductDetails' => 'Image'
);
....
public function getCMSFields()
{
...
$uploadField = new UploadField('ProductDetails','Bilder');
$uploadField->setFileEditFields('getCustomFields');
$uploadField->setFolderName('Uploads/Products/' . $this->Categories()->First()->Title);
$fields->addFieldToTab("Root.Main", $uploadField);
return $fields;
}
}
class ProductDetail extends DataExtension
{
static $db = array (
'Text1' => 'Text',
...
);
private static $belongs_many_many = array (
'Product' => 'Product'
);
function getCustomFields() {
$fields = new FieldList();
$fields->push(new TextField('Text1'));
...
return $fields;
}
}
class ProductDetailExtension extends DataExtension {
private static $belongs_many_many = array('Product' => 'Product');
}
_config.php
Image::add_extension('ProductDetailExtension');
Image::add_extension('ProductDetail');
Any idea what´s going on? Did someone follow this tutorial, too?