Hi,

I just installed buddylist, following the installation instructions carefully (but deciding not to include the optional php code mentioned in the installation file, mostly because I am not sure what it is supposed to do).

Then I decided to test the module.

I am working on a drupal site installed on my own computer, using an apache server at localhost. I have two user accounts set up on the site at this stage: the first account - the site administrator - and a test user.

I performed the following test using both these users:

I viewed the user profile of the other user and clicked "Add [the user] to my buddy list".

In both cases, the following page content was displayed:

add to buddylist
warning: array_merge() [function.array-merge]: Argument #1 is not an array in D:\Inetpub\Portal\includes\menu.inc on line 415.
warning: Missing argument 1 for buddylist_addbuddy() in D:\Inetpub\Portal\modules\buddylist\buddylist.module on line 713.
This user does not exist

In addition, the selected user was never added to the account´s buddylist.

What´s wrong or what do I need to do?

Thanks,

Thomas

Comments

xamox’s picture

I tried it as well and am getting the same exact problem. I am using a local install as well. I have tried it with multiple users and made sure access control was setup properly for each type of user.

geoffers12’s picture

I found the same problem :

My fix : untested really - just noticed that the add/remove works ;)

edit the file buddylist.module - lines 76 and 77
change
arg(2)
to
array(arg(2))

so they look like this :

      $links[] = array('path' => 'buddy/add', 'title' => t('add to buddylist'), 'access' => user_access('maintain buddy list'), 'callback' => 'buddylist_addbuddy', 'callback arguments' => array(arg(2)), 'type' => MENU_CALLBACK);
      $links[] = array('path' => 'buddy/delete', 'title' => t('delete from %buddylist', buddylist_translation()), 'access' => user_access('maintain buddy list'), 'callback' => 'buddylist_deletebuddy', 'callback arguments' => array(arg(2)), 'type' => MENU_CALLBACK);

[without the stupid line wrap]

Geoff

xamox’s picture

Awesome, thanks, it works now.

tcjohans’s picture

Yep, for me too it worked fine in Bluemarine.

Though now I have just changed to PHPTemplate instead and it does not show there. I have not really given it much effort yet though, so maybe it will.

Thomas

EnekoAlonso-1’s picture

Thanks, that fixed the problem! I was pretty upset about this module after upgrading to 4.7.
Thanks a lot.

robertdouglass’s picture

Status: Active » Fixed

fixed in 4.7 and HEAD.

Anonymous’s picture

Status: Fixed » Closed (fixed)