Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Thumbnails not being generated for images

edited March 2012 in Vanilla 2.0 - 2.8

For some reason when I upload images, thumbnails are not being created. The folders for the thumbnails are getting created at

/uploads/thumbnails/FileUpload/XX

but no thumbnail images are created. The URL for the thumbnail is

mydomain.com/vanilla/utility/thumbnail/FileUpload/XX/xxxxxxxxxxxxx.jpg

but that URL obviously doesn't work if there are no images.

Any pointers as to what I could do to troubleshoot this?

Best Answers

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    If you are getting a bonk then you need to put your forum in debug mode and see what the error could be.

    $Configuration['Debug'] = TRUE;
    
  • Answer ✓

    You sir Todd are my hero.

    The error was "The uploaded file could not be processed because GD is not installed."

    apt-get install php5-gd and a restart of Apache solved my problem.

    Thanks!

Answers

  • 422422 Developer MVP

    Thumbnail and Thumbnails

    Looks like a folder issue. 2nd example says thumbnail.

    1st example says thumbnails.

    Have you checked paths and permissions

    There was an error rendering this rich post.

  • The folders were the default ones created by the plugin. I tried even setting the permissions to 777, but no luck.

    mydomain.com/vanilla/utility/thumbnail/FileUpload/XX/xxxxxxxxxxxxx.jpg

    This URL gives me the "Bonk. Something funky happened. Please bear with us while we iron out the kinks." error. I'm assuming this is a 500 error.

    mydomain.com/vanilla/utility/thumbnails/FileUpload/XX/xxxxxxxxxxxxx.jpg

    But the thumbnails URL gives me a 404 page not found error.

  • 422422 Developer MVP

    Create folder called thumbnails and 777 it

    There was an error rendering this rich post.

  • The folder is already called thumbnails. I created one called thumbnail, but no effect.

    I deleted the thumbnails folder, but when I uploaded an image, a new thumbnails folder was created.

  • 422422 Developer MVP

    Have you chcked conf file, i think path is set in there... Im mobile so cant check

    There was an error rendering this rich post.

  • ToddTodd Chief Product Officer Vanilla Staff
    Answer ✓

    If you are getting a bonk then you need to put your forum in debug mode and see what the error could be.

    $Configuration['Debug'] = TRUE;
    
  • Answer ✓

    You sir Todd are my hero.

    The error was "The uploaded file could not be processed because GD is not installed."

    apt-get install php5-gd and a restart of Apache solved my problem.

    Thanks!

  • hgtonighthgtonight ∞ · New Moderator

    @leo72

    You can see in the error report what the issue is. An invalid path is being passed to the mkdir function. If you look at the variable debug log, your target path is set to C:\\path\\to\\uploads\\C:/the/full/actual/path.

    Change line 114 to be: $TargetPath = ltrim($TargetParsed['Name'], '/');

    I am pretty sure this is an issue with your wamp install because it works fine on every webhost I have ever put it on except for wamp and xampp.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • leo72leo72 New
    edited January 2014

    I am sure the problem is in Gdn_Upload::Parse function.
    If you put as argument "C:\wamp\www\findarmenian_stingle\forum/uploads/thumbnails/FileUpload/76/e2c48bcee588deaf7f78f4e825c18d.png"
    it returns
    C:\wamp\www\findarmenian_stingle\forum/uploads/C:/wamp/www/findarmenian_stingle/forum/uploads/thumbnails/FileUpload/76/e2c48bcee588deaf7f78f4e825c18d.png

    It joins two strings!!!
    Going to fix tomorrow. Too late here :-)
    Thank you very much!

Sign In or Register to comment.