When an image crop field is added to a portion of a content type that is not displayed by default (for example, in a collapsed fieldset or a field group tab), the crop widget does not display when the field is displayed.

It appears this issue was caused by an outdated version of jCrop bundled with the module. I attached a diff that updates jCrop to the latest version (which appears to have fixed the issue).

Original Post:

I have 2 or more "images with croping fields" to display into a form for creating content.

- 2 images with cropping fields displayed into the same vertical or horzontal or accordion tab : OK
- 1 image with cropping field in one / the other into the second division : NOT ok (cropping zone not displayed, impossible to move the cropping zone, etc...)

???

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webmestre’s picture

I noticed that
- "images with cropping" fields displayed in 1st tab are OK
- "images with cropping" fields displayed in 2nd tab are NOT ok

Even if I add a custom css class name to each.

MY ANALYSIS about the problem : if an "image with cropping" field is displayed into the 2nd or further tab, the display is bad.

Other element noticed :
When 3 tabs displayed :
- 1st with "image with cropping" field : OK
- 2nd with texts and others fields (no image) : OK
- 3rd with "image with cropping" field : NOT ok

=> Impossible to correctly display "image with cropping" fields if not in 1st position. :-(((

Stalski’s picture

Status: Active » Postponed (maintainer needs more info)

We will need more info. What's a cropping field.

=> Impossible to correctly display "image with cropping" fields if not in 1st position. :-(((

- 2nd with texts and others fields (no image) : OK

Isn't this a contradictory?

webmestre’s picture

Hello,
thanks for helping.

The Drupal module is here http://drupal.org/project/imagefield_crop

When testing this field, try to combine and overall to put those fields not into the 1st tab (that's OK) but in second or further tab. That's the meaning of my previous post.

Stalski’s picture

Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Needs work

Thx for the input. I must say this gets minor priority for now. You can always post a patch to speed things up, when patches are submitted we will review it asap and push it to git.
Anyone up for it?

Stalski’s picture

Status: Needs work » Postponed (maintainer needs more info)
FileSize
89.3 KB

I tried this with version 7.x-1.x and 7.x-2.x of imagefield_crop and I did not have any problem what so ever. Screenshot is attached.

Stalski’s picture

I was able to reproduce this error, but I can't get it working in the root of the form nor the first vertical tab pane.

webmestre’s picture

Hello,
when trying again in a new website, if the tab or the div containing the cropped image is collapsed, the image is not shown as cropped. The cropping zone and the original image are not displayed.
A pity because I really need this module.

nils.destoop’s picture

Project: Field Group » Imagefield Crop
Status: Postponed (maintainer needs more info) » Active

I can confirm your issue.

- Set settings from a div fieldgroup to open: the cropping toolbox works
- Set settings from a div fieldgroup to collapsed: the cropping toolbox breaks

This is a js issue for imagefield_crop, as the rendering is done on the same way.

webmestre’s picture

@zuuperman : I confirm your analyse to be good.
A way to fix the problem ?

sammarks15’s picture

Title: Image with cropping NOT well displayed » Cropping area doesn't display when in collapsed tab.
Version: 7.x-1.0 » 7.x-2.0
Priority: Minor » Major
Issue summary: View changes
Status: Active » Needs review
FileSize
293.02 KB

I apologize for bringing this issue back up, but I discovered the same issue. It appears that when you use imagefield_crop in conjunction with field_group, the crop box doesn't display at all when it's in a portion of the page that isn't displayed by default (as in, you have to click on a tab or expand an accordion to get it to display).

I solved the issue by simply updating jCrop to the latest version (0.9.12 instead of 0.9.9).

I've attached a patch with the changes, updated the title for clarity, and changed the active version to 7.x-2.0 (because that's where I found the bug and tested the changes). I've updated the priority to Major since this is a pretty significant issue.

sammarks15’s picture

Issue summary: View changes

Update description for clarity.

welly’s picture

Status: Needs review » Reviewed & tested by the community

Just confirming the patch above (#10) is resolving the same issue that I was having.

likewhoa’s picture

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

re-rolled patch against 2.x branch.