Closed (works as designed)
Project:
Profile 2
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Feb 2011 at 08:19 UTC
Updated:
14 Jun 2011 at 09:18 UTC
I have 2 extra profile types setup using profile 2. When I edit and save one of these additional profiles the user picture in the main user account vanishes and is deleted from the default/files/pictures folder.
I have tried setting up the user avatar as a separate image field in the user profile but the same thing happens.
Has any one else noticed this?
Comments
Comment #1
benjohnstone commentedThis is a problem for me also. subscribing!
Comment #2
gurojoh commentedSame for me!
Comment #3
gc11 commentedSame here, subscribing
-------------------------------------------------
For me it seems to delete the user picture when the user logs back in also, including all image styles.
Comment #4
teh_catt commentedThere is a working patch here http://drupal.org/files/issues/935592_user_profile_picture_4.patch that you apply to drupal/modules/user/user.module and hey presto! no more vanishing pictures.
If like me you find applying patches mind bogglingly confusing use this tutorial http://drupal.org/node/32875 and when you run the patch skip the first bit (the test) and then type in user.module as for the second part of the patch. This should do the trick.
Comment #5
gurojoh commentedYes, that works!Thank you very much!
Comment #6
gc11 commentedyep fixed for me too, thanks.
Comment #7
sw3b commentedIs this patch plan to be ported to the core ?
Comment #8
alpritt commentedYes, there is an issue for core to sort this out at #935592: User picture is deleted after calls to user_save(). I think it would be possible to sort this out for profile2 by making sure the picture was loaded in $edit when user_save() is called, but hopefully the fix will get added to core soon enough. But I'll leave this active in case the maintainers do want to do a temporary hacky fix here first.
Comment #9
fagoupdate to drupal 7.2 / see http://drupal.org/node/935592#comment-4501198