Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Problem when uploading an image (image field).

Our old forums are still available as a read-only archive.

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

Page: 1
Go to End
Author Topic: 6036 Views
  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Problem when uploading an image (image field). Link to this post

    Hi,

    I just found a problem when uploading an image through an image field.

    Situation :
    - Added an image-field to my article type (for thumbnail use)
    - The field shows up correctly in the backend
    - When uploading an image from my local hard-drive , it will upload the file correctly , but the iFrame will not redirect correctly (page not found error in IE , in FireFox it will just be blank).
    - After refreshing the page , everything works perfectly.

    See screenhots below :
    http://www.lemon8.nl/silverstripe/bug1.jpg
    http://www.lemon8.nl/silverstripe/bug2.jpg
    http://www.lemon8.nl/silverstripe/bug3.jpg
    http://www.lemon8.nl/silverstripe/bug4.jpg

  • Fuzz10
    Avatar
    Community Member
    786 Posts

    Re: Problem when uploading an image (image field). Link to this post

    I found another little bug in the backend which has to do with the Image CMS Field.

    Replace or add an existing image through the CMS interface, pick "with one from the file store" but don't choose anything in the dropdown (just leave "(choose)") .. press "attach image" or "replace" and you'll get :

    Fatal error: Call to undefined method stdClass::write() in /var/www/sites/www.lemon8.nl/htdocs/test6/sapphire/core/model/Image.php on line 401

  • cgorion
    Avatar
    Community Member
    2 Posts

    Re: Problem when uploading an image (image field). Link to this post

    Hi

    Did you manage to find a solution for this issue?

    I'm frustrated right now, as it worked perfectly on my test server (a copy of my live server).

    But now I have deployed the webste it's not working anymore.

    I hope someone can help with this

    Thanks

  • cgorion
    Avatar
    Community Member
    2 Posts

    Re: Problem when uploading an image (image field). Link to this post

    Problem SOLVED!!!!!!!!!!!

    The problem was basically a permission restriction.
    All images uploaded through the ecommerce modules get resized, thus they need to be put in the _resampled folder.
    Since in my case the _resampled folder had (CHMOD 775). Appearantly that wasn't enough and I couldn't change it.

    So I created a new folder in the Uploads root and called it _resampled2 (with CHMOD 777)
    Then I deleted the original _resampled folder
    And then re-named my _resampled2 to _resampled

    Now it's working perfectly

    6036 Views
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.