I've installed buddylist 4.7 and have two problems. First, buddylist_access has the old form fields so I get function not found errors. I tried updating the form fields identified using formupdater, but something isn't right. I replace the code it says and end up with a unexpected T_Double_arrow error.

Second, I go to add a user to my buddylist and am always taken to the page that says this user does not exist. Any idea how to fix these problems?

Comments

robertDouglass’s picture

The buddylist_access.module hasn't been updated for 4.7 and shouldn't be included with the download until it is. My bad for not removing it. I'll see if I get time to look at it soon --- feel free to do the update and submit a patch.

lunas’s picture

Roger that. I'll wait for buddylist_access - not much of a developer.

As for the second problem - when I click "add xxx to my buddylist" I am always taken to a page that says that user doesn't exist when they in fact do exist. Is the main buddylist module working with 4.7 ?

robertDouglass’s picture

Main buddylist should be working in 4.7, but needs testing. It could be that the buddylist_access module is interefering with your ability to see the users, but I'm only guessing since I haven't even looked at that module yet to know what it does.

lunas’s picture

I've removed buddylist_access and it hasn't helped. I'm getting multiple errors in watchdog to the effect of:

--Missing argument 1 for buddylist_addbuddy() in /yadda/yadda/modules/buddylist/buddylist.module on line 696.
--array_merge() [function.array-merge]: Argument #1 is not an array in /yadda/yadda/includes/menu.inc on line 411.
--ou have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: user_access SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /drupal/includes/database.mysql.inc on line 120.
--implode() [function.implode]: Bad arguments. in /drupal/modules/user.module on line 339.
--array_keys() [function.array-keys]: The first argument should be an array in drupal/modules/user.module on line 339.

The first three are repeated over and over everytime it tries to load a buddylist link. The sql error shows up when trying to add the user to the buddylist. Not sure when the last two show up...

lunas’s picture

The last three errors listed there are because of the privatemsg module, disregard. Just the first two that are the problem.

robertDouglass’s picture

I think that I had improperly tagged the 4-7 branch and it is therefore likely that you weren't using the latest code. Sorry for that. If you use a CVS client to get your code, the HEAD and 4-7 branches should be identical now, both with the most recent updates. If you grab the .tar file,m you'll have to wait until it gets packaged for download (1 day, I guess). Make sure that you are using revision 1.48.2.3 (4-7) or Revision: 1.54 (HEAD).

http://cvs.drupal.org/viewcvs/*checkout*/drupal/contributions/modules/bu...

lunas’s picture

Sorry, still no joy. I put the right revision of buddylist on my site and I still have the above two errors and users cannot be added to the buddylist.

The line number changed on the error, but that's about it.

Missing argument 1 for buddylist_addbuddy() in /yadda/yadda/drupal/modules/buddylist/buddylist.module on line 697.
array_merge() [function.array-merge]: Argument #1 is not an array in /yadda/yadda/drupal/includes/menu.inc on line 411.

Any more suggestions?

robertDouglass’s picture

Nope, I'm stumped =) I can't reproduce locally. I'm sure there is a bug there, but I have to figure out how to reproduce it.

Have you tried clearing your cache table?

TRUNCATE TABLE `cache`; 

The only place that the buddylist_addbuddy() function gets called is from the menu system, and it appears that it isn't passing the argument. Do this test: go to a page where you see the link "add xyz to my buddylist" and copy the link location and paste it for me to see here. I expect to see something like this:

http://domain/?q=buddy/add/1&destination=user%2F1

We'll get there! If your site is online I could take a look at it there, too.

lunas’s picture

Truncated the cache - didn't help.

Here is one of the links:

http://www.freejournal.net/drupal/buddy/add/3702?destination=node

Straight from the front page. Obviously the site is http://www.freejournal.net if you want to check it out there. Appreciate your help.

Aaron

robertDouglass’s picture

do you have pathauto turned on? If so, is it aliasing users?

lunas’s picture

I don't have pathauto, just clean urls enabled.

robertDouglass’s picture

On your site there is an extra "user" in the add buddy url:

http://www.freejournal.net/drupal/user/buddy/add/3619

Your $base_url seems to be http://www.freejournal.net/drupal, and the path for adding the buddy is buddy/add/3619, and I don't know where the user in the middle comes from. Perhaps you can help debug some and see how it is getting there?

Regardless, I tested it with the correct URL and got the result you reported.

lunas’s picture

I don't see where you see an extra user in the url? All the links leading to the add buddy don't have it from what I can see. I tried disabling clean urls to see if it would work - nope.

robertDouglass’s picture

lunas’s picture

Now I see it, unfortunately I have no idea why it is doing that...

lunas’s picture

Hey Robert, any luck figuring out what is up?

robertDouglass’s picture

Not yet, sorry. Will ping you when I get a chance to work on this.

deekayen’s picture

Title: Cannot add buddy » Finish 4.7 upgrade
Category: support » task

Please don't put two bugs in the same issue. I think I plugged the add/delete bug for HEAD and DRUPAL-4-7, and I switched some 4.6 form functions in the access file to the 4.7 FAPI, but I didn't upgrade the access db queries, which are broken.

robertDouglass’s picture

Thanks! Can you open a new issue with the db access problem that you mentioned? It's not clear to me which you mean. Then we can mark this issue as fixed and focus on the remaining.

deekayen’s picture

Title: Finish 4.7 upgrade » Cannot add/delete buddy
Category: task » bug
Status: Active » Fixed

Moving access problem to: http://drupal.org/node/54570

Anonymous’s picture

Status: Fixed » Closed (fixed)