Hi everyone, I'm having some troubles uploading a simple image on a simple page.php... I did everything I need to do, and I'm 100% sure my code is correct, but I'm still having a weird error, I enclosed a .JPG on which you can see the error, it's a JQuery error, but I can't find out why I'm getting it :/
It looks like this is a Json error, but seriously, why? O_O
EDIT : I'm doing this on a fresh install of the latest update of SS..
Btw, here's the code I used to create the image, just to make sure :)
private static $has_one = array(
'Photo' => 'Image'
);
public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.Main", new UploadField('Photo'));
return $fields;
}
Thank you :-)