working on this. patch upcoming
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 38820_0.patch | 1.66 KB | Wesley Tanaka |
| #5 | 38820.patch | 446 bytes | Wesley Tanaka |
| #1 | user-list-cross-contamination.patch | 446 bytes | Wesley Tanaka |
working on this. patch upcoming
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 38820_0.patch | 1.66 KB | Wesley Tanaka |
| #5 | 38820.patch | 446 bytes | Wesley Tanaka |
| #1 | user-list-cross-contamination.patch | 446 bytes | Wesley Tanaka |
Comments
Comment #1
Wesley Tanaka commentedfixed (patch attached)
Comment #2
Wesley Tanaka commentedSince this is such an obvious problem, the patch is so small (1 line), and the effects are localized, I'm going to say it's ready to commit, but please disagree with me if this isn't the right fix.
Comment #3
dries commentedHow can we reproduce this?
Comment #4
chx commented$value = profile_view_field($account, $field)this may fail and then $field->value is not updated. I do not know how this could happen, so some explanation would be nice. Also, do not assign NULL but use unset.Comment #5
Wesley Tanaka commentedIt was happening on: http://treehouse.ofb.net/go/en/profile
which you can look at for background.
What would happen in the userlist was something like this:
Dries
Dries Buytaert
http://www.buytaert.net/
Java, virtual machines, profiling and instrumentation, embedded systems, online communities, self-organization, politics, usability, photography, gadgets, skiing, sailing, mounties, the future
chx
Károly Négyesi
http://www.buytaert.net/
Java, virtual machines, profiling and instrumentation, embedded systems, online communities, self-organization, politics, usability, photography, gadgets, skiing, sailing, mounties, the future
someotheruser
http://www.buytaert.net/
women, beer, music
newuser
http://www.buytaert.net/
women, beer, music
spamuser
http://www.casino.website/
women, beer, music
The site was upgraded from 4.6.3 (somewhat patched up to fix issues that apparently aren't going to get committed into 4.6 branch) to CVS 2005-11-25 sometime +08:00. I used the update.php script that came with the CVS version to run all updates from update_129 to update_154. I had installed profile.module on 4.6.3 before the update, and most users had created their profiles before the update as well.
all my field ids are smaller than 15, so this bizarre check isn't the one that's failing (but that should probably get fixed too)
I haven't tested this theory yet, but from a peephole inspection of profile_view_field(), I'm guessing that the $user object that gets passed in does not have object fields set for profile values which are blank. That would cause this branch
to be if (UNSET), which would fail, and the function would fall off the end.
Anyway the patch with unset instead of assignment to NULL is attached.
Comment #6
Wesley Tanaka commentedTo answer this question, I think this might work:
Comment #7
dries commentedMaybe a more elegant fix is not to pass
$fieldsby reference and to return a copy, rather than not returning anything in_profile_update_user_fields(). Care to investigate this some more?Comment #8
Wesley Tanaka commentedThat's fine too.
That was the first approach I took, but thought that a smaller patch might be more likely to be accepted.
Patch attached implementing comment #7
Comment #9
dries commentedCommitted to HEAD. Thanks.
Comment #11
buddaThis issue is still happening for me with the very latest profile.module from CVS
$Id: profile.module,v 1.131 2006/01/26 13:43:04 dries Exp $My fresh Drupal 4.7b4 profile.module outputs the following on the ?q=profile page:
The users 'kharding' and 'smannion' have profile fields filled in, but the other two users (superuser and admin) don't - but they inherit the profile field values from the other two users.
Comment #12
darius commentedFixed by http://drupal.org/node/44724
Comment #13
Wesley Tanaka commentedit looks like this bug report had morphed to mean something else.
re-marking as fixed, since the problem originally reported in this bug report was indeed fixed, independent of whether or not it recurred later.
Comment #16
cilefen commentedFixing after a spammer changed the version. I think this was 5?
Comment #17
avpaderno