Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Steps to reproduce the bug:
1. go to Home » user account => edit
2. upload picture
3. go to edit again
4. change anything or nothing at all (don't mark checkbox "Delete picture")
5. Submit
6. The picture disappears.
So, any change in "edit user account" removes the user picture.
Comment | File | Size | Author |
---|---|---|---|
#5 | pic_fix2.patch | 4.5 KB | Steve Dondley |
Comments
Comment #1
Steve Dondley CreditAttribution: Steve Dondley commentedDuplicate of: http://drupal.org/node/44074
Comment #2
gregglesComment #3
crunchywelch CreditAttribution: crunchywelch commentedThis patch, by Steve Dondley fixes this, this is not a duplicate of 44074, but rather is where this patch should be so its not lost.
http://drupal.org/files/issues/pic_fix.patch
Comment #4
crunchywelch CreditAttribution: crunchywelch commentedThis patch does fix this issue, but causes another, which is that the picture can now not be deleted ;). Setting this back to 'needs work'.
Comment #5
Steve Dondley CreditAttribution: Steve Dondley commentedOK, here's a more thorough fix. This bug was hard to track down because it's a combination of two different problems. 1) The name of the $form['picture']['picture'] element was getting trampled so I renamed it to $form['picture']['picture_upload'].
A second problem is that the $form['picture']['picture_delete'] was not seen by forms.inc when the form was submitted. This was fixed by making it hidden at the appropriate time.
Comment #6
darius CreditAttribution: darius commentedTested the patch, everything seems to work now.
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedThis patch does what it says it does and the code looks ok to me.
Comment #8
Dries CreditAttribution: Dries commentedComment #9
(not verified) CreditAttribution: commented