I'm using the module with setting output resolution to 0 (so the ratio and min size checkboxes are unchecked).

I get the following notices after saving the field edit form:

Notice: Uninitialized string offset: 0 in _imagefield_crop_widget_enforce_ratio_validate() (line 137 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).
Notice: Uninitialized string offset: 0 in _imagefield_crop_widget_enforce_minimum_validate() (line 144 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).
Notice: Uninitialized string offset: 0 in _imagefield_crop_widget_enforce_minimum_validate() (line 145 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).

and these on the node edit screen:

Notice: Undefined offset: 1 in imagefield_crop_widget_process() (line 211 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).
Notice: Undefined variable: width in imagefield_crop_widget_preview_process() (line 308 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).
Notice: Undefined variable: height in imagefield_crop_widget_preview_process() (line 309 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).
Notice: Undefined variable: width in imagefield_crop_widget_preview_process() (line 321 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).
Notice: Undefined variable: height in imagefield_crop_widget_preview_process() (line 322 of path_to_drupal\sites\all\modules\imagefield_crop\imagefield_crop.module).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

progpapa’s picture

Status: Active » Needs review
FileSize
3.43 KB

The attached patch seems to solve the issues.

joetsuihk’s picture

Status: Needs review » Needs work

@progpapa thanks for the patch. But I cannot save the new crop image for some reason. You can?

progpapa’s picture

Status: Needs work » Needs review
FileSize
3.29 KB

Looks like it doesn't like the way I'm hiding the preview + there were a few other places that needed some changes.

Please try the new patch, it works for me. It might need some more work, but hopefully it's getting close. :)

likewhoa’s picture

Had to re-roll patch with some changes. Now all notices are gone.

likewhoa’s picture

Seems I missed something which php-5.6 didn't care about. This is a re-rolled of my previous patch.

likewhoa’s picture

Alex Bukach’s picture

#6 works for me. Thanks!

SchwebDesign’s picture

I had to implement a combination of patch #1 and #6. but it seems to have fixed the issue.

vladimir.krupin’s picture

After applying #6 croparea size is lost and image is shown in full size.
There is patch

Gnanasampandan Velmurgan’s picture

After applying the #9 patch. All notice issues get solved. Thanks.

jenlampton’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
2.29 KB

I was having trouble with the patch file formatting, so rerolled. But based on the feedback in #10, marking as RTBC.