Thumbnails - Failed to load resource

I’m on omeka 2.4.1. The thumbnails aren’t being created. Specifically i’m trying to add an item to a gallery exhibit. The “Attatch an item” page is where I’m getting a “Failed to load resource: the server responded with a status of 404 (Not Found)” message. It’s trying to get a thumbnail file that doens’t exist, then it uses the fallback. I’ve tried ImageMagick (The file path test says it works), I’ve also tried setting it to GD (fileDerivatives.strategy = “Omeka_File_Derivative_Strategy_GD” in the config file). Nothing seems to work. I’ve checked the logs and there’s nothing about the Thumbnails not being generated. Any help would be much appreciated.


Quick question for clarification: it sounds like what you’re saying is that the thumbnails aren’t loading when attaching an item to an exhibit page block. Does the thumbnail exist when browsing items, or you’re not getting thumbnails when uploading a file to an item either?

It’s not showing up at all, but the 404 message only comes up when attaching an item. If I view it live, the thumbnails are not showing up (The fallback image comes up), but there’s no 404 message.

Also the image that it’s supposed to make a thumbnail out of is a jpg.

Are you using any custom settings for storage in your config.ini file?

The error you’re describing is a little odd: we won’t even try to load thumbnails if we couldn’t successfully make them. A 404 means that Omeka thinks it created thumbnails for the file and tried to embed them on the page, but the browser wasn’t able to find them.

If you’re just using the regular storage with no changes, does it look like the thumbnail files exist in the files folder?

We haven’t changed the config.ini file at all, so I believe we’re using default storage settings. The thumbnail files don’t exist in the in the files directory.

So, the files under files/original are there as expected, but there’s nothing at all in files/thumbnails?

You said there’s nothing in the log about thumbnails not being generated. Is there anything at all in the log?

There are some old Thumbnails, but not the ones it says are not found. They are in the originals folder though. There’s not much in the log file. Only what’s below, but I believe that’s just from when I was testing changing the fileDerivatives.strategy:

2016-08-17T00:00:52+00:00 ERR (3): exception ‘Omeka_File_Derivative_Exception’ with message ‘This derivative strategy requires ext/imagick.’ in /var/www/online-exhibits/application/libraries/Omeka/File/Derivative/Strategy/Imagick.php:27
Stack trace:
#0 /var/www/online-exhibits/application/libraries/Omeka/Application/Resource/Filederivatives.php(43): Omeka_File_Derivative_Strategy_Imagick->__construct()
#1 /var/www/online-exhibits/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(695): Omeka_Application_Resource_Filederivatives->init()
#2 /var/www/online-exhibits/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource(‘filederivatives’)
#3 /var/www/online-exhibits/application/libraries/Zend/Application/Bootstrap/BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL)
#4 /var/www/online-exhibits/application/libraries/Zend/Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL)
#5 /var/www/online-exhibits/application/libraries/Omeka/Application.php(51): Zend_Application->bootstrap()
#6 /var/www/online-exhibits/index.php(23): Omeka_Application->initialize()
#7 {main}

Something “interesting” is definitely happening here then.

There should be an entry in the log whenever we can’t make a thumbnail, and also there’d be an entry or error if we couldn’t move the file from its temporary location to the actual files folder. Further, from what you’re saying, Omeka’s actually recording in the database that it did successfully create thumbnails for those files, which it shouldn’t do if they weren’t created.

Have you checked your PHP log as well? (On many systems, PHP errors will be in Apache’s error log). Additionally, can you post the contents of the System Information page (linked at the bottom of every admin page)?

Nothing in the php logs (except for some old messages).

This is a stumper. I don’t see any obvious red flags in your system information. and the lack of logging is a little baffling.

Can you run this command in your Omeka directory?

ls -ld files/{,*}

Just to check on the permissions of the various folders (though a permissions problem should still be coming up in the logs).

This is what I’m seeing:

drwxrwxrwx 7 cao89 www-data  4096 Aug 16 15:22 files/
drwxrwxrwx 2 cao89 www-data 57344 Aug 16 15:22 files/fullsize
drwxrwxrwx 2 cao89 www-data 57344 Aug 16 15:22 files/original
drwxrwxrwx 2 cao89 www-data 57344 Aug 16 15:21 files/square_thumbnails
drwxrwxrwx 2 cao89 www-data  4096 Aug 16 15:21 files/theme_uploads
drwxrwxrwx 2 cao89 www-data 57344 Aug 16 15:22 files/thumbnails

I’m having the same issue on my local environment as well as production. The snippet is from my local, the only difference on production is that it’s set to 775.

Hmmmmm, okay, not seeing much there of interest.

How about the /tmp folder? That’s where we’ll process the incoming files by default. Do you have a bunch of Omeka-bound files sitting around in there (longish hexadecimal strings for filenames)? Or perhaps are you out of or low on disk space for /tmp or another filesystem (check with df -h)?

I’m grasping at straws a little bit here. If none of that helps, the next thing to try would probably be doing a totally vanilla installation from a 2.4.1 zip and no plugins installed and seeing if the problem persists there as well.

We finally figured this out. It was a weird apache issue that we were having (and in fact it was also causing issues with image uploading). We had to set the user and group owner to www-data. We’re looking into why that is, typically you would think changing the group would be enough. One question though, now that thumb nails are being generated, do you know of a way to re-upload images that don’t currently have thumbnails without having to have each user re-upload images for each item?

If the originals successfully uploaded, but just didn’t get derivatives, you could try the Derivative Images plugin to (re)generate derivatives.

Awesome! That worked great. Thank you so much!