Jump to:

520 Posts in 248 Topics by 263 members

Content Editor Discussions

SilverStripe Forums » Content Editor Discussions » Problem uploading photos

Forum for content editors and CMS users.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 217 Views
  • Quan
    Community Member
    1 Post

    Problem uploading photos Link to this post

    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.

  • Jare
    Community Member
    5 Posts

    Re: Problem uploading photos Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.