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.

CommentFileSizeAuthor
#5 pic_fix2.patch4.5 KBSteve Dondley
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Steve Dondley’s picture

greggles’s picture

Status: Active » Closed (duplicate)
crunchywelch’s picture

Status: Closed (duplicate) » Reviewed & tested by the community

This 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

crunchywelch’s picture

Status: Reviewed & tested by the community » Needs work

This patch does fix this issue, but causes another, which is that the picture can now not be deleted ;). Setting this back to 'needs work'.

Steve Dondley’s picture

Priority: Normal » Critical
Status: Needs work » Needs review
FileSize
4.5 KB

OK, 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.

darius’s picture

Tested the patch, everything seems to work now.

merlinofchaos’s picture

Status: Needs review » Reviewed & tested by the community

This patch does what it says it does and the code looks ok to me.

Dries’s picture

Status: Reviewed & tested by the community » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)