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

Patrick Nelson’s picture

I 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.

robertdouglass’s picture

I'll be spending some time with this module in the coming week and can look into the issue. Can you clarify this sentence:

Problem is compounded by the fact that nobody actually likes the user that is always added.

Patrick Nelson’s picture

RE: 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 :)

robertdouglass’s picture

=)

lunas’s picture

I 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.

revival’s picture

Has this been committed? Thanks

revival’s picture

Hi 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 :)

Patrick Nelson’s picture

On 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:

Buddies

        * BigEd

Buddy of

        * BigEd

But, when you look at BigEd's profile, that new user is in neither his Buddies nor his Buddy of lists.

Any ideas, anyone?

Patrick Nelson’s picture

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

jwilde’s picture

Version: 4.7.x-1.x-dev » master

Getting 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.

igy-1’s picture

RE: #5 submitted by lunas on April 2, 2006 - 12:12

I 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.

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?

robertdouglass’s picture

Status: Active » Fixed

fixed for 4-7

Patrick Nelson’s picture

This 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!?!

robertdouglass’s picture

please 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.

geohelper’s picture

Status: Fixed » Active

I'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?

innovation2’s picture

Hi,

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

webchick’s picture

Title: More add buddy/delete buddy problems » Fatal error when attempting to to add buddy

I 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.

webchick’s picture

Doing some more digging, I believe this stems from the callback arguments not being placed into an array -- note the difference between:

'callback arguments' => array($id)

and

'callback arguments' => arg(2)

The error will only surface on PHP 5 it seems. PHP 4 doesn't seem to complain.

Now, when I tried:

'callback arguments' => array(arg(2))

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)

arava_phani’s picture

Today 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

greggles’s picture

Status: Active » Closed (fixed)

This 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).