Hi,
I have a small problem with this great module which seems to differ a bit from the other similar issues posted here.
I can use the crop feature fine the very first time I upload an image via file field (screenshot 1).
When I try to edit this image though, everything seems to be broken (screenshot 2):
Neither is the correct (cropped) image shown, nor can I crop the original image again. The only way to correct this is to start over again by deleting the image and re-upload it. Even in this case though, the first image will be shown after deletion until a new one is actually uploaded (screenshot 3).
Does anybody have a similar issue and knows how to correct it?
Thanks a lot in advance!
Comments
Comment #1
yhager commentedAre there any javascript errors on the page while screenshot 2 is shown? You can check the javascript console or firebug if you have it installed (and you should!)
Comment #2
Golem07 commentedThanks yhager for the quick reply.
Not sure if i looked in the right place. But in firebug under "console->errors" it shows nothing during all of the above steps. Is this the one you meant?
Comment #3
yhager commentedSeems like you looked in the right place, but from the error description it sounds like a javascript error.
Can you try and use a default theme? or maybe disable a few modules? just so we narrow it down with which component imagefield_crop is misbehaving.
Comment #4
Michsk commentedOk i got the same thing with dev.
Firebug:
Fout: jQuery is not defined
File: http://##.nl/user/1/edit/profiel
Rule: 425
Here's something going wrong:
<!-- file not found: --><script type="text/javascript">jQuery.extend(Drupal.settings.imagefield_crop, { "edit-field-profiel-afbeelding-1": { "box": { "ratio": 1.33333333333, "box_width": 500, "box_height": 500 }, "minimum": { "width": "200", "height": "150" }, "preview": "" } });</script></div></div>This is the first impression. Nothing tested or altered yet. I have the field in a group and use vertical tabs. Might be something with that combination. Will report when i know more.
Comment #5
Michsk commentedAs expected.
When removing the field from the group (fieldet). It shows as it should. So there is a bug with this module and groups (fieldsets).
Comment #6
Michsk commentedOk the jquery is undefined error is because i have $scripts at the bottom. So that is another thing in this module. You should use drupal_add_js consistant.
Comment #7
yhager commented> You should use drupal_add_js consistant
Can you elaborate?
Comment #8
Michsk commentedyhager: I tried using drupal_add_js() but that doesnt seem to do it since i cant get to call the argument when a 'another field' is added. Guess that is also why your using
and not drupal_add_js(). This is something that will need to be investigated.Comment #9
urbanbricks commentedSubscribing. Same issue with editing node after successful cropping, also using fieldsets with vertical tabs for node editing organization.
Comment #10
takki commentedGot the some problem, not using fieldsets. Image looks fine the first time but after node edit something goes wrong.
Comment #11
guigui_nyc commentedI just had the issue too. I doubt it's going to be a very common problem but I was having issue with my CDN script (we sync our images to Amazon S3 using the Drupal CDN module). New images were not syncing and because of that the imagecrop was only working at the node creation.
Comment #12
menesisz commentedSubscribing. Same issue with the rc2 and dev versions. I am using fieldsets, Vertical tabs and Panels.
Comment #13
Sinan Erdem commentedsub
Comment #14
open social commentedI have debugged it to imagefield_Crop.js
on line 21: onChange: function(c)
in a normal situation c is filled with data in the vertical tabs situation it is empty.
I am searching for a fix, I am not that good in jquery, will see what I can do
Comment #15
open social commentedokay, managed to show it: but not a fix right now,
if you comment out in vertical_tabs.js
// Activate the first tab.
//$('fieldset.vertical-tabs-pane').hide();
it will load. so it has to do something with being hided while loading
Comment #16
JamesK commentedMarking as duplicate of #719714: Collapsed fieldgroups break crop area display. where work is progressing on solutions to this.