I grabbed the latest snapshot on 2007-08-09 and noticed that my thumbnails were not displaying right due to this css:

.acidfree-cell{width:26px;}.acidfree .acidfree-cell{height:45px;}

I traced this to acidfree.module which expects _acidfree_get_sizes() to return an array indexed by the various attributes like 'width'

I dug into the function and in my case, i was executing the 2nd branch because image_get_sizes doesn't exist but _image_get_sizes does. The code is executing:

if (function_exists('_image_get_sizes')) {
return _image_get_sizes($size);
}

However, _image_get_sizes doesn't take a parameter and returns an array of arrays. I modified this to return just the array for the request size (i.e. 'thumbnail')

if (function_exists('_image_get_sizes')) {
$sizes = _image_get_sizes();
foreach ($sizes as $key=>$sz) {
if ($size['label'] == $size) {
return $sz;
}
}
}

And now my thumbnails look great!

CommentFileSizeAuthor
#2 acidfree_fix_image_size.patch.txt416 bytesChris Bray

Comments

bkat’s picture

Seems like _image_get_sizes() has changed. I upgraded to the lasted version of the image module and it behaves like acidfree expects.

Chris Bray’s picture

StatusFileSize
new416 bytes

I got bitten by this this morning, it turns out the Image module has renamed _image_get_sizes to _image_get_dimensions when you need to pass the name of the size.

Attached patch fixes this problem for me.

--- acidfree.module.original    2007-08-16 12:39:03.000000000 +0100
+++ acidfree.module.fixed_size  2007-08-17 09:55:05.000000000 +0100
@@ -2575,6 +2575,9 @@
 }

 function _acidfree_get_sizes($size=null) {
+    if (function_exists('image_get_dimensions')) {
+        return image_get_dimensions($size);
+    }
     if (function_exists('image_get_sizes')) {
         return image_get_sizes($size);
     }

vhmauery’s picture

Status: Active » Closed (fixed)

This bug was fixed long ago.

Chris Bray’s picture

How do I get a version with this fixed in it then?
I've tried the development version (http://ftp.drupal.org/files/projects/acidfree-5.x-1.x-dev.tar.gz) and it's still broken...

Chris Bray’s picture

Status: Closed (fixed) » Active

How do I get a version with this fixed in it then?
I've tried the development version (http://ftp.drupal.org/files/projects/acidfree-5.x-1.x-dev.tar.gz) and it's still broken...

vhmauery’s picture

Status: Active » Closed (fixed)

Make sure you are using the latest image module as well. Things work fine for me with the latest image module.