Hi All,
Not sure if I'm missing something here or maybe someone can tell me this is a know issue.
I have a simple DataObject called 'Brand' like so...
class Brand extends DataObject {
static $db = array(
"Title" => "Varchar(256)",
"WebsiteLink" => "Varchar(256)"
);
public static $has_one = array(
"HomePage" => "HomePage",
"Logo" => "Image"
);
public static $summary_fields = array(
'Title'
);
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Main", new TextField("Title", "Title"));
$fields->addFieldToTab("Root.Main", new TextField("WebsiteLink", "Website Link"));
$fields->addFieldToTab("Root.Main", new UploadField("Logo"));
$fields->removeFieldFromTab("Root.Main", "HomePageID");
return $fields;
}
}
And 'Brands' can be added to a page using the new GridField like:
$brandsConfig = new GridFieldConfig_RelationEditor();
$brandsTable = new GridField("Brands","Brands",$this->Brands(),$brandsConfig);
everything so far is cool BUT when I try to attach a image to a 'Brand' object (adding or editing) it seems the form action is messing up and the DataObject has no controller action kicking in to deal with the 'upload' method... it returns a 404.... eg:
http://zqpublic.nimeso/admin/page/edit/EditForm/field/Brands/item/1/ItemEditForm/field/Logo/upload (Wont work)
http://zqpublic.nimeso/admin/page/edit/EditForm/field/HeaderImage/upload (Will work - used in my base Page class)
Cheers guys! Great job so far! looking Asum!