Hi,
Forgive me if my problem are related to datamodel, but its hapen in DataObject child class. I using "file" type in my class. Its look like this :
class JakpusUpdate extends DataObject {
public static $db = array(
'InfoMsg' => 'Varchar(255)'
);
public static $has_one = array(
'InfoFile' => 'File',
'JakpusUpdateListPage' => 'JakpusUpdateListPage'
);
// Summary fields
public static $summary_fields = array(
'InfoMsg' => 'Info Update',
'InfoFile' => 'Gambar / Video',
'Created' => 'Dibuat'
);
public function getCMSFields_forPopup() {
$fileField = new UploadField('InfoFile', 'Gambar / Video');
$fileField->allowedExtensions = array('jpg','gif','png', 'flv');
// Name, Description and Website fields
return new FieldList(
new TextareaField('InfoMsg', 'Info Update'),
$fileField
);
}
}
Point on this code
public static $has_one = array(
'InfoFile' => 'File',
'JakpusUpdateListPage' => 'JakpusUpdateListPage'
);
Its give me Server Error page when I tried to accessed backend editor related to this class, its show like pic I've attached.
But if, change the code to this, the error not showup :
public static $has_one = array(
'InfoFile' => 'Image',
'JakpusUpdateListPage' => 'JakpusUpdateListPage'
);
I don't have any clue why this happen. Can anyone help me ?
thanks.