Closed (works as designed)
Project:
Acidfree Albums
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2007 at 22:24 UTC
Updated:
21 Feb 2008 at 20:00 UTC
Iwas able to upgrade from Drupal 4.7 to 5.3, however i found a problem using the [acidfree] tag. There is no problem if i provide a size, but if i use size=M then i get the following error:
warning: Division by zero in /var/www/drupal/sites/all/modules/acidfree/acidfree.module on line 1876.
I can see the images always (albums preview, thumbnail) except when i use size=M to add images to a story or page.
Any ideas?
Comments
Comment #1
Obi-Wan@hispa-net.com commentedThe problem that causes division by zero is
acidfree.module, line 1876
But in fact the problem is this code:
acidfree.module, line 1866
because $size[0] and $size[1] returns 'M' as value instead a number.
Comment #2
vhmauery commentedM is not one of the options. Specify the size in pixels.
Comment #3
Obi-Wan@hispa-net.com commentedFrom Acidfree help:
* size: {M, WxH} where M=max dimension and WxH=WidthxHeight
Comment #4
Obi-Wan@hispa-net.com commentedComment #5
vhmauery commentedM is a placeholder for a number (in pixels) of the Max Dimension. Whereas WxH is the same thing but that allows you to specify the height and width manually (and possibly in a ratio that does not match the image proportions. Sorry if the documentation is confusing, but it behaves exactly as I intended it. If you don't like that, please submit a patch to the documentation.
Comment #6
Obi-Wan@hispa-net.com commentedOn your 4.x releases size=M showed the image using original dimensions. But after upgrade to 5.x stopped working.
Should I change ALL the acidfree tags by hand to show the images at full dimensions again? :-(
Comment #7
vhmauery commentedHmmm. That sounds like 4.7 was broken. Poor user input filtering...
Something that might help would be an sql query to update your nodes for you.
Now, be very careful with that. Please back up your database first. That will set all your inlines to be 640 pixels in one dimension (and the other will keep the aspect ratio of the image).
Comment #8
vhmauery commentedI suppose a more specific query might be a better idea...
This only messes with nodes that actually have [acidfree:nnn] tags