Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Upgraded to 1.1 and now i get this error when editing a node with a cropped image field.
Warning: imagecopyresampled() expects parameter 5 to be long, string given in image_gd_crop() (line 190 of /home/admin/public_html/mit/modules/system/image.gd.inc).
disabling the module and the errors go away
Comment | File | Size | Author |
---|---|---|---|
#8 | imagecopyresampled_expects_parameter_5_to_be_long-1911226-8.patch | 797 bytes | realityloop |
Comments
Comment #1
jay-dee-ess CreditAttribution: jay-dee-ess commentedGetting this w/ 1.1 and 1.1-dev
Comment #2
joetsuihk CreditAttribution: joetsuihk commentedNeed more info. Cannot reproduce on ubuntu 12.04 gd2 imagefield_crop 1.x-dev
Suspect something around imagefield_crop.module line 513 image_crop(), which invoke
http://api.drupal.org/api/drupal/modules%21system%21image.gd.inc/functio...
Can you check your $crop['x']? Need to change to int manually?
Comment #3
miik4 CreditAttribution: miik4 commentedRegarding this version I get the exact same message when saving a node which contains image that is using image field crop.
And this error comes when node is saved when the cropping tool wasn't showing up.
Meaning when I edit a node, I only see the image (and the image is shown from upper left corner to defined size NOT from earlier set cropping area)
When I hit refresh in node/##/edit the system does load the cropping tool (sometimes hit refresh twice), then I can do editing and save without errors.
Very confusing, because sometimes the cropping tool shows instantly.
And I don't think this is a browser issue, tested with Firefox, Safari & Chrome - same behavior (and console gives no errors).
I can live with this now, though it's annoying to tell clients/colleagues/people that you have to hit referesh furiously if the tool isn't showing :)
I got the same thing with dev-version => have to dig out more with this issue.
Edit:
Okay I was using image field in vertical tab group. If the group isn't first (=active when node/##/edit loads) then crop tool might not be there.
Moved Images group to first and voilà \o/
Comment #4
jnettikI am getting this same error:
with and additional PDO and log error of:
For me I think it had to do with my image. The image being uploaded was 2px smaller in width than my crop was set to. When I scaled the image up and tried agan, there were no errors.
Comment #5
very_random_man CreditAttribution: very_random_man commentedI'm getting this error too. It seems to be conflicting with the Field Group module. If I put image fields with cropping inside of a field group, it makes the error. Outside the group and it works just fine.
Comment #6
jnettikThat makes sense. I was using Field Groups when I was using this module/
Comment #7
DesTincT CreditAttribution: DesTincT commentedtry to add a little code here
imagefield_crop.module
added width and height to .cropbox image element to make js work
Comment #8
realityloopPatch attached