Hi

Thanks for the great module. I just upgraded from 5.x-1.5 to 5.x-1.6 and after running upgrade.php, cron.php and flushing preset images the cropping fails to work.

I have 4 different presets each of which has the problem, all have 2 actions, first scale (120x180 scaled to fit outside dimensions) and then to crop (120x180 center/center).

To fix I revert back to 1.5, run upgrade.php, cron.php and flush preset images.

Below are the 3 different errors I get in the logs :

error 1 : Division by zero in /EM/www/EM1/www/sites/default/modules/imagecache/imagecache.module on line 183.

error 2 : getimagesize(imagecache/providersub/files/photos/image_102.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /EM/www/EM1/www/sites/default/modules/imagecache/imagecache.module on line 208.

error 3 : filesize() [function.filesize]: stat failed for imagecache/providersub/files/photos/image_102.jpg in /EM/www/EM1/www/sites/default/modules/imagecache/imagecache.module on line 209.

I hope that's enough information.

Thanks

CommentFileSizeAuthor
#1 picture-317-1213886886.jpg1.01 KBderjochenmeyer
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

derjochenmeyer’s picture

FileSize
1.01 KB

i can confirm this bug... see attatched thumb (the actual picture is the white corner on the bottom right, the black area is not part of the original image)

going back to version 1.5 solves the problem...

paulnem’s picture

Is this possibly a duplicate of http://drupal.org/node/242932 or at least part of the issue?

jonathanwinn’s picture

Just to concur, I had the same issue, and went back to 1.5. It's fixed. Whew!

paulnem’s picture

boshard was also having the issue : http://drupal.org/node/278182

paulnem’s picture

Title: Upgrade results in crop not working » 1.5 - 1.6 Upgrade results in crop not working
paulnem’s picture

I've applied the patch from http://drupal.org/node/242932 to ImageCache 1.6 on my test environment. The problem I've described in this issue is resolved. I will play around and check anything else I can.

paulnem’s picture

Status: Active » Closed (duplicate)
varkenshand’s picture

Same problems here with
http://www.teinstituut.nl/view/photos
Version 1.6 not working at all.
Tried flushing all caches and deleting folders using ftp, but had to revert to 1.5.

yan’s picture

I'm getting the following errors with 5.x-1.6:

Division by zero in (...)/imagecache.module on line 169.
getimagesize(imagecache/<preset name>/files/images/<file name>) [<a href='function.getimagesize'>function.getimagesize</a>]: failed to open stream: No such file or directory in (...)/imagecache.module on line 208.
filesize() [<a href='function.filesize'>function.filesize</a>]: stat failed for imagecache/<preset name>/files/images/<file name> in (...)/imagecache.module on line 209.
benovic’s picture

same here :(

mydllurth’s picture

Having the same problem; perhaps this finding might illuminate the real problem:

I change permissions, granting o+w on any image which precipitates the error. Logs of that error cease. However, when adding new images, the newly added image produces the similar error. If directory ownership is recursively changed to www-data:www-data (Debian/Ubuntu hosted), the symptoms persist.

Studying the imagecache.module, I found line 168 with a reference to $tmpdestination which was uninitialized. Changing $tmpdestination to the initialized $tmp variable, the errors stop issuing.

diff imagecache.module.orig imagecache.module
168c168
<     $size = getimagesize($tmpdestination);
---
>     $size = getimagesize($tmp);
md2’s picture

I had the same problem with crop not working correctly. It caused the image to appear small in the bottom right of the imagecache image. I've applied the patch from http://drupal.org/node/242932 to ImageCache 1.6 on my test environment and everything appears to be working fine.

Good work