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!
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | acidfree_fix_image_size.patch.txt | 416 bytes | Chris Bray |
Comments
Comment #1
bkat commentedSeems like _image_get_sizes() has changed. I upgraded to the lasted version of the image module and it behaves like acidfree expects.
Comment #2
Chris Bray commentedI 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.
Comment #3
vhmauery commentedThis bug was fixed long ago.
Comment #4
Chris Bray commentedHow 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...
Comment #5
Chris Bray commentedHow 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...
Comment #6
vhmauery commentedMake sure you are using the latest image module as well. Things work fine for me with the latest image module.