This started today on a website that has been running for over two months. I have a custom module that creates an image using the following code:
$image = image_style_url("catalogue_category_image_size", $product->field_product_image["und"][0]["uri"]);
This also did not work, but was the original code from earlier today:
$image = image_style_url("catalogue_category_image_size", $product->field_product_image["und"][0]["filename"]);
Here is the site, for reference: http://www.boudiccacollection.com/boudicca-catalog
I have no errors at all in the watchdog log or in apache logs. My status report page is green.
The only thing I would note is that the site was recently upgraded to drupal 7.23 from drupal 7.18
I have disabled clean url's to no avail.
EDIT I've added $conf['image_allow_insecure_derivatives'] = TRUE;
to my settings.php and it did not correct the issue, however I now have error messages relating to 2 styles of one image (not all styles...)
Watchdog message: http://www.boudiccacollection.com/sites/default/files/styles/catalogue_category_image_size/public/BR004_WEB.jpg?itok=hetdMSsA http://www.boudiccacollection.com/boudicca-catalog Unable to generate the derived image located at public://styles/catalogue_category_image_size/public/BR004_WEB.jpg.
EDIT The same image is used in three places and works in one and not the other two.
Place 1 (broken):
- URL: http://www.boudiccacollection.com/boudicca-catalog
- Image: http://www.boudiccacollection.com/sites/default/files/styles/catalogue_category_image_size/public/BR004_WEB.jpg?itok=hetdMSsA
Place 2 (broken):
- URL: http://www.boudiccacollection.com/boudicca-catalog
- Image: http://www.boudiccacollection.com/sites/default/files/styles/catalogue_category_product_image_size/public/BR004_WEB.jpg?itok=SIXXe2Yq
Place 3 (works):
- URL: http://www.boudiccacollection.com/br004-br004-four-corners-ring
- Image: http://www.boudiccacollection.com/sites/default/files/styles/catalogue_product_image_size/public/BR004_WEB_0.jpg?itok=ZtLPZpD9
Place 3 has a different URL even though all of the code should be pulling the same image. Maybe this isn't an image_cache problem...
$product->field_product_image["und"][0]["uri"]
actually points to something valid. I've seen lots of language discussions out there and"und"
sticks out. If this no longer points to something good, a quickdrupal_set_message()
andprint_r()
of$product
should give you what you need.