2

When uploading a new asset the loading bar appears complete but does not actually upload the JPG. I've investigated the Craft logs and cannot find any errors regarding this.

In the Javascript console I can see the error:

http://your-domain.com/index.php/admin/actions/assets/uploadFile 500 (Internal Server Error)

I'm using MAMP but this also happens on our development servers running apache.

This issue does not happen with PNG's.

After further investigation I found the Preview for the uploadFile "thing".

This Preview had the content

PHP Error [500]

include(/Users/you/Sites/your-domain/craft/app/vendor/lsolesen/pel/src/PelInvalidDataException.php):
failed to open stream: No such file or directory 
(/Users/you/Sites/your-domain/craft/app/vendor/composer/ClassLoader.php:412)

I then looked in the lsolesen vendor folder (which happens to handle stuff for Jpg and Tiff files) and the PelInvalidDataException.php file is missing.

I've copied this file from the git repo into the vendor folder and this now works. However this feels sketchy as hell.

I'm wondering whether it could be a composer install issue

Anyone got any ideas?

2

My guess is you had an auto-update or a git deployment go bad and some files didn't get updated properly.

To be safe, I'd download a fresh copy of Craft from https://craftcms.com and replace your existing craft/app folder with the new one to make sure you've got all of the latest files.

  • Thanks Brad. Replacing the whole craft/app folder worked a treat. Must have been a bad auto update – Adam Hughes Jun 2 '16 at 14:04
  • I replaced the App folder but it won't upload any JPG files. I have MAMP Pro 4.2 (PHP 7.0.20) installed. What can I do to fix this? – Martijn La Feber Aug 7 '17 at 8:03
  • @MartijnLaFeber See craftcms.stackexchange.com/questions/5415/… – Brad Bell Aug 7 '17 at 15:43
  • Some things are changed in MAMP 4.2, so these instructions will not do anymore. – Martijn La Feber Aug 8 '17 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.