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.
When the user clicks remove to change the image to crop the image is still left under the filefield.
This only seems to happen if the form already has a previous image saved in a node.
It would logical that if you click remove, all traces of the image would be removed from the form.
Comments
Comment #1
mr.alinaki CreditAttribution: mr.alinaki commentedI approve - this is not very good behaviour :)
Comment #2
Bilmar CreditAttribution: Bilmar commentedI am experiencing the same problem and came across this post. Is this as per design?
I hope it is something that can be looked at and I will be the first to test to give feedback =)
Thank you in advance!
Comment #3
rburgundy CreditAttribution: rburgundy commentedsubscribing - I think this causes confusion to end-user if their picture was in fact actually removed (if it still shows after they press the remove button)
Comment #4
rburgundy CreditAttribution: rburgundy commentedimage attached to show issue mentioned.
please let me know if anymore details are required.
thanks
Comment #5
OneTwoTait CreditAttribution: OneTwoTait commentedSame here.
Plus, after removing, saving, and returning to the edit page, the full image is there. Actually there are two full images stacked one on top of another, but one is all black except for the part in the crop box.
After refreshing the page, there is no image.
This image is from Firefox 3.
Comment #6
OneTwoTait CreditAttribution: OneTwoTait commentedOops, wrong image.
Here is the actual beautiful image from the website.
Comment #7
rburgundy CreditAttribution: rburgundy commentedI am still experiencing this issue. I am guessing others as well? More comments may help bring this issue to the surface =)
Comment #8
waxb CreditAttribution: waxb commentedany updates on this?
Comment #9
robby.smith CreditAttribution: robby.smith commentedthis is still happening with the latest dev =(
Comment #10
sydneyshan CreditAttribution: sydneyshan commentedThis is still happening with 6.x-1.0-rc2
Any chance of a bug fix on this one?
I'm encountering it with an 'unlimited' imagefield upload list - it may well work on a single/limited imagefield upload list?
Comment #11
bnfan CreditAttribution: bnfan commentedYes, this is also happen on our site. Very ugly bug, we have no method to fix it.
When will this bug be fixed!
Comment #12
aether CreditAttribution: aether commentedNot a proper fix but I needed a quick solution. Works for my current purposes (single images, not sure how it would work with multiples).
Place this in a module or theme's javascript file:
Comment #13
bnfan CreditAttribution: bnfan commentedThank you aether, it works for us!
Comment #14
drupalprojects CreditAttribution: drupalprojects commentedI think i've found a proper way to fix it. I've tried to narrow down the problem and found that hook_widget_value was invoked before the actual file delete and we don't check if remove button was clicked in imagefield_crop_widget_value. This lead to some problems:
1) _imagefield_crop_resize invoked on remove event. In my case (my images is huge) this lead to memory issues on th server
2) problem, described by previous authors.
So a quick fix from me:
Should be added right after if ($edit) { in imagefield_crop_widget_value
Comment #15
quadbyte CreditAttribution: quadbyte commentedSeems to me it's a major UX problem. I'm not too found of the fix in #14 but it seems to be the best as of today. Attached a patch for review.
Comment #16
amitaibu@quadbyte,
Haven't tested yet, but patch seems to take the right approach. I'd change the docs a bit, though, and copy from filefield:
Comment #17
YK85 CreditAttribution: YK85 commented+1 subscribing
Comment #18
pcambra#15 Works for me
I'm attaching the patch with the filepath fixed and the docs suggested by #16
Comment #19
paulbeaney CreditAttribution: paulbeaney commentedApplied the patch in #18 - works fine for me. Thanks very much.
Regards,
- Paul
Comment #20
YK85 CreditAttribution: YK85 commentedthis patch helped with my problem as well.
thank you
Comment #21
Naiya CreditAttribution: Naiya commentedI think that this thumbnail is ok, maybe it should be a task - an administrative option/checkbox if we want or don't want this thumb?
Comment #22
YK85 CreditAttribution: YK85 commentedIt is strange for a thumbnail to remain on the page after Remove was clicked by the user. It definitely looks like a bug from an end-user perspective, as when they choose a different image and upload the lingering thumbnail then disappears. What does everyone else think?
Comment #23
sydneyshan CreditAttribution: sydneyshan commentedI definately agree - it makes no logical sense for this thumbnail to remain.
Comment #24
univate CreditAttribution: univate commentedI fixed this using a slightly more generic method by checking if '#access' variable on the element.
Comment #25
univate CreditAttribution: univate commentedActually that previous patch caused some regressions, I also noticed there was some code that was attempting to check for the remove button but not working so this is a re-worked patch.
Comment #26
Open Social CreditAttribution: Open Social commentedlast patch works fine!
Comment #27
nampham CreditAttribution: nampham commentedThank you so much, it works for me.
Comment #28
muldos CreditAttribution: muldos commentedThanks, I run into the same issue and the latest patch works for me too !
For themes putting all their scripts just before page closure, I made a patch (http://drupal.org/node/962382#comment-4900678) that solve both issues.