0

I am creating a node programatically which has an imagefield with 16 images attached. Each image is a blank PNG of about 1000px by 768px weighing in at about 5KB. The node displays fine.

On a separate path I have a View that displays the images attached to the node using a image style to shrink each images down to about 250px by 150px.

Sometimes when I first use the View to display the node maybe 5 (say) of the styles are not successfully generated. For each unsuccessful attempt I see a watchdog entry "Failed to create the style directory" followed by "Unable to generate the derived image located at ....". However the other 11 image styles are successfully generated in the correct directory.

Typically if I then hit the browser refresh button the broken image styles are then successfully generated.

This is Drupal 7.30 on shared hosting.

What is wrong ? Thanks.

  • sounds like a server issue. When you refresh, do the files actually exist in the proper directory? When it fails, can you confirm which files actually exists in the proper directory? when you say "sometimes when I first use the view" what happens in between your first uses - do you close the browser, or clear the browser cache, etc? do you have a proper temp folder on the site with proper permissions? – Geoff Sep 11 '14 at 13:01
  • Agreed. It sounds like a server issue. When it fails all the original files are available and in the correct place. Some of them are successfully replicated into a styles subdir, but some not. I'm not doing anything between first uses. I save the node, it redirects to the node view ( which doesn't use image styles, and then I click on the link which goes to the View which uses the image styles. Most of the time it works, but occassionally ( maybe 1 in 10 times ) some of the styles fail to be generated. The site status report shows no problems with the tmp directory. – elb Sep 11 '14 at 17:41
  • if you haven't already, I would ask this in the server-fault site as well - something else that came to mind, are you only using one file type: i.e. could there be a problem with png's, gif's, jpg's, etc. – Geoff Sep 11 '14 at 19:32

Your Answer

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

Browse other questions tagged or ask your own question.