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.
Hi,
I've installed Imagefield Crop 7.x-1.1. When I edited image widget settings and then saved them, i got the following list of warnings:
The reason of this warnings is that during widget form validation first executes _image_field_resolution_validate() that converts resolution dimensions from array to a string value (WIDTHxHEIGHT). But validation functions that invokes after counts on array values, and not on string.
The patch that solves this issue is attached.
Comments
Comment #1
iggi CreditAttribution: iggi commentedThanks for the patch Spleshka, it worked for me.
Comment #2
iggi CreditAttribution: iggi commentedPatch tested on version 7.x-1.1
Issue fixed.
Changed version from 7.x - 2.2 dev
Comment #3
joetsuihk CreditAttribution: joetsuihk commentedHi @iggi, can you test if the bug exists on 1.x-dev? We do not apply patches to v1.1
Comment #4
jonloh CreditAttribution: jonloh commented@joetsuihk 1.x-dev does not have this issue fixed. I would suggest to merge this patch into the latest dev to solve this issue.
Comment #5
SpleshkaSo should we do this against 7.x-1.x or 7.x-2.x?
Comment #6
joetsuihk CreditAttribution: joetsuihk commented@Spleshka you can decide, someone else is working on 2.x branch, while I am working on 1.x branch.
As stated above, please provide patch against 1.x-dev or 2.x-dev, thank you!
Comment #7
SpleshkaOkey, here is patch for 7.x-1.x. In 7.x-2.x I saw a workaround that should solve the issue.
Comment #8
SpleshkaSmall patch correction.
Comment #9
SpleshkaAny progress in this issue?
Comment #10
BrianVu CreditAttribution: BrianVu commentedI'm wondering the same thing. I don't know how to apply these patches to my downloaded module files and am wondering if someone can update the downloads with the fixed patches
Comment #11
Spleshka@BrianVu, https://drupal.org/patch/apply.
As an alternative, you may instal Dreditor and then use "Simplytest.me" button near the patch to test the patch.
Comment #12
er_d0s CreditAttribution: er_d0s commentedCan this be merged into dev? Pretty obvious solution, don't be lazy!
Comment #13
joetsuihk CreditAttribution: joetsuihk commented@er_d0s if you had been using this patch and it is working correctly for you, mark this as "reviewed and tested". We do not merge "needs review" patch into dev.
Comment #14
csc4 CreditAttribution: csc4 commentedPatch in https://www.drupal.org/node/2154341#comment-8468381 seems to be working for me and has fixed the warnings
Comment #16
joetsuihk CreditAttribution: joetsuihk commentedcommitted to 1.x branch. Thanks everyone.
Comment #18
capfive CreditAttribution: capfive commentedDo we know if this will be submitted to 7.x-1.1? Would be good to have it within the stable version :)
Comment #19
jeromewiley CreditAttribution: jeromewiley commentedWhich version should I download? Dev version is dated older than the 1.x version which is not patched?
Please advise, thank you!
Comment #20
capfive CreditAttribution: capfive commented@jeromewiley
The patch attached applies to 7.x-1.x-dev, which is why I was asking it if would be applied to the latest stable version.
I would love if someone was able to do it as I don't have the knowledge on patching :(
Comment #21
capfive CreditAttribution: capfive commentedHere is a patch for those who haven't updated to the dev.
This will apply to the latest stable copy (7.x-1.1)
Comment #22
rbayliss CreditAttribution: rbayliss at Last Call Media commentedThe patch in #21 was relative to the site root. Here's a reroll relative to the module directory. Again, this is to apply against 7.x-1.1. The dev version already has this fix.
Comment #23
Gnanasampandan Velmurgan CreditAttribution: Gnanasampandan Velmurgan as a volunteer commentedWe are facing the warning issues after saving the image crop field. The current Dev 7.x-1.1 they have not updated this attached patch for this issues. After applying this below attached patch file the warning issues will be solved.