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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

iggi’s picture

Thanks for the patch Spleshka, it worked for me.

iggi’s picture

Version: 7.x-2.x-dev » 7.x-1.1
Status: Needs review » Reviewed & tested by the community

Patch tested on version 7.x-1.1
Issue fixed.

Changed version from 7.x - 2.2 dev

joetsuihk’s picture

Status: Reviewed & tested by the community » Needs review

Hi @iggi, can you test if the bug exists on 1.x-dev? We do not apply patches to v1.1

jonloh’s picture

@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.

Spleshka’s picture

So should we do this against 7.x-1.x or 7.x-2.x?

joetsuihk’s picture

@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!

Spleshka’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
FileSize
1.21 KB

Okey, here is patch for 7.x-1.x. In 7.x-2.x I saw a workaround that should solve the issue.

Spleshka’s picture

Small patch correction.

Spleshka’s picture

Any progress in this issue?

BrianVu’s picture

I'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

Spleshka’s picture

@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.

er_d0s’s picture

Can this be merged into dev? Pretty obvious solution, don't be lazy!

joetsuihk’s picture

@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.

csc4’s picture

Status: Needs review » Reviewed & tested by the community

Patch in https://www.drupal.org/node/2154341#comment-8468381 seems to be working for me and has fixed the warnings

  • joetsuihk committed d690d63 on 7.x-1.x authored by Spleshka
    Issue #2154341 by spleshka: Fixed warning Illegal string offsets...
joetsuihk’s picture

Status: Reviewed & tested by the community » Fixed

committed to 1.x branch. Thanks everyone.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

capfive’s picture

Do we know if this will be submitted to 7.x-1.1? Would be good to have it within the stable version :)

jeromewiley’s picture

Which version should I download? Dev version is dated older than the 1.x version which is not patched?
Please advise, thank you!

capfive’s picture

@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 :(

capfive’s picture

Here is a patch for those who haven't updated to the dev.

This will apply to the latest stable copy (7.x-1.1)

rbayliss’s picture

The 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.

Gnanasampandan Velmurgan’s picture

We 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.