when I upload photos in Silver Stripe I get following error:
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
I tried to find a slution in Google, bot the only possible couse of this problem I found is exceeded disk quota or no access rights to the uploads directory.
The access rights are 0777 and disk quota is definitely not exceeded.
12 August 2014 at 4:02am
(Last edited: 15 August 2014 5:34pm),
I have exactly the same error message. I'm using SilverStripe 3.1.5. Images get uploaded correctly into the folder and can be seen in the Files section of the CMS. The problem is that they do not get linked with the data object for what they were uploaded.
I can see this in the error log:
PHP Fatal error: Call to a member function getURL() on a non-object in /*path-to-silverstripe*/framework/forms/UploadField.php on line 911, referer: https://*silverstripe-url*/admin/subjects/Subject/EditForm/field/Subject/item/57/edit
Edit: I managed to get this fixed for myself (finally). I'm using SortableFiles module and forgot to add $many_many_extraFileds to my class, which led to my relation table not having a 'SortOrder' field. That made saving records of files to the database to fail.