Closed (fixed)
Project:
Buddylist
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2006 at 06:50 UTC
Updated:
8 Jun 2006 at 22:19 UTC
Using the "fixed" code from cvs which supposedly fixed the add/delete buddy problems still has some problems. I can now add a buddy, however it doesn't add the right user. It always adds the same user. Once that user is on my buddylist, I am unable to add anyone else - either get the "this user is on your buddylist" or "you cannot add yourself" page. You can see the problem on my site http://www.freejournal.net
Comments
Comment #1
Patrick Nelson commentedI confirm I'm having the same problem - using latest CVS of 4.7 and latest buddylist files.
Problem is compounded by the fact that nobody actually likes the user that is always added.
Comment #2
robertdouglass commentedI'll be spending some time with this module in the coming week and can look into the issue. Can you clarify this sentence:
Comment #3
Patrick Nelson commentedRE: That sentence, sorry Robert, it was just a joke - the user that is added is my brother and we work together on that site, so I knew he would see this post - it was just for fun :)
Comment #4
robertdouglass commented=)
Comment #5
lunas commentedI fixed the problems by commenting out the following line in the add buddy function and the delete buddy function in buddylist.module
$uid = (int)$uid[0];
Now all seems to work great.
Comment #6
revival commentedHas this been committed? Thanks
Comment #7
revival commentedHi there
I don't know anything about CVS etc., but was wondering whether this had been fixed? I keep looking at this page to see if it's been fixed :)
Comment #8
Patrick Nelson commentedOn first appearance, this does seem to fix the problem but there is still weirdness happening with buddylist.
Basically, whenever somebody new joins our site, they always get the same user automatically added to their buddylist and that user seems to have them added to their buddylist. What do I mean by seems to?
Well, when you look at the new user, you see this:
But, when you look at BigEd's profile, that new user is in neither his Buddies nor his Buddy of lists.
Any ideas, anyone?
Comment #9
Patrick Nelson commentedSorry, slight error above. The only reason that the new user doesn't appear in BigEd's lists is because of the limitation on the number of buddies shown on the profile page. Fact remains that new members are still getting added to his list and he is getting added to theirs.
Comment #10
jwilde commentedGetting an error message when I enable Buddylist access configuration: user warning: Duplicate entry '1-0-buddyof||universal' for key 1 query: INSERT INTO node_access (nid, gid, realm, grant_view) VALUES (1, 0, 'buddyof||universal', 1) in /home/jasbell/public_html/testsite/includes/database.mysql.inc on line 120.
Testing with 4.7 head.
Comment #11
igy-1 commentedRE: #5 submitted by lunas on April 2, 2006 - 12:12
Just remove the '[0]' and it'll work.
The problem is it's only taking the first character of whatevever "uid" is, so for user "12" for example, it'll try tyo add user "1" instead.
I'm guesing the function used to work on the value of the full querystring, and not just the uid?
Comment #12
robertdouglass commentedfixed for 4-7
Comment #13
Patrick Nelson commentedThis fix STILL doesn't work for me. I am now running buddylist module version 1.48.2.8 and I have tried it with and without [0] and every new user still gets added to that one users buddylist.
What am I doing wrong!?!
Comment #14
robertdouglass commentedplease open a new issue and describe what you have to do to recreate the problem. You're describing a different problem than the one listed here, as far as I can tell.
Comment #15
geohelper commentedI'm having the same issue with version 1.60 of the buddylist.module...
* warning: array_merge() [function.array-merge]: Argument #1 is not an array in
/home/username/domain.org/includes/menu.inc on line 415.
* warning: Missing argument 1 for buddylist_addbuddy() in
/home/username/domain.org/modules/buddylist.module on line 713.
Not to be rude, but why is this taking so long to fix?
Comment #16
innovation2 commentedHi,
I'm new to Drupal and not certain that this is the proper place to post my question . . .
I have installed the latest version of buddylist (4.7) and it comes up blank even after a new user has registered. Guess I'm doing something wrong - have created the permissions and activated the blocks. What am I missing?
Thanks
Comment #17
webchickI can confirm the problem #15 describes (though geez, what a tone...).
When viewing a user profile (user/2), and clicking the "Add blah to my buddy list" link, I'm taken to this error:
" * warning: array_merge() [function.array-merge]: Argument #1 is not an array in \includes\menu.inc on line 415.
* warning: Missing argument 1 for buddylist_addbuddy() in \modules\buddylist\buddylist.module on line 713.
This user does not exist"
Sorry, I don't have a chance to look into this right now, but the path I'm forwarded to is buddy/add/2&destination=user%2F2 ... could it be grabbing the whole 2&...2 thing and passing that in?
I'm using the newest version of buddylist 4.7:
// $Id: buddylist.module,v 1.48.2.11 2006/05/17 06:02:25 robertDouglass Exp $
and current DRUPAL-4-7.
Comment #18
webchickDoing some more digging, I believe this stems from the callback arguments not being placed into an array -- note the difference between:
and
The error will only surface on PHP 5 it seems. PHP 4 doesn't seem to complain.
Now, when I tried:
the fatal error went away, however it seems to forget what user it's looking at (the link changes to buddy/add/0 which is no good)
Comment #19
arava_phani commentedToday morning I also digged into this and got the same understanding as webchick,
Changing in buddy/add and buddy/delete links[]:
'callback arguments' => array(arg(2)) should solve the problem
I didntg have the problem webchick was talking abt. Running on Drupal 4.7 with PHP5
Comment #20
gregglesThis bug was closed and deserves to stay closed, not hijacked for a new purpose.
http://drupal.org/node/64053
That has the real problem (and now it has a patch).