1.5 - 1.6 Upgrade results in crop not working

paulnem - July 1, 2008 - 03:30
Project:ImageCache
Version:5.x-1.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

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

#1

derjochenmeyer - July 2, 2008 - 09:37

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...

AttachmentSize
picture-317-1213886886.jpg1.01 KB

#2

paulnem - July 2, 2008 - 14:47

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

#3

jonathanwinn - July 3, 2008 - 15:25

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

#4

paulnem - July 3, 2008 - 16:04

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

#5

paulnem - July 3, 2008 - 16:04
Title:Upgrade results in crop not working» 1.5 - 1.6 Upgrade results in crop not working

#6

paulnem - July 3, 2008 - 19:13

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.

#7

paulnem - July 3, 2008 - 19:24
Status:active» duplicate

#8

varkenshand - July 9, 2008 - 15:54

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.

#9

yan - July 12, 2008 - 10:57

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.

#10

Ben__ - August 11, 2008 - 03:41

same here :(

#11

mydllurth - August 29, 2008 - 02:25

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);

#12

md2 - September 4, 2008 - 14:13

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

 
 

Drupal is a registered trademark of Dries Buytaert.