I tried the current 2.x version in CVS (was not allowed to tag this issue with anything but 1.x-dev though...) and I found a potential Views related problem. Views with nothing to do with buddy_api are starting to throw errors like:

user warning: Unknown column 'buddylist.buddy' in 'on clause' query: SELECT node.nid, node.created AS node_created_created, mymodule_videos.vid AS mymodule_videos_player FROM node node LEFT JOIN mymodule_node_mapping mymodule_node_mapping ON node.nid = mymodule_node_mapping.nid LEFT JOIN mymodule_videos mymodule_videos ON mymodule_node_mapping.vid = mymodule_videos.vid INNER JOIN users users ON buddylist.buddy = users.uid WHERE (node.status = '1') AND (node.type IN ('mymodule_node')) AND (UPPER(mymodule_videos.type) = UPPER('live')) AND (users.name = 'admin') ORDER BY node_created_created DESC LIMIT 0, 1 in /xxxxxxxxx/includes/database.mysql.inc on line 172.

Haven't researched this thoroghly, but I suspect the problem is that in buddy_api.views.inc, the Views hook buddy_api_views_tables() defines a 'users' table, which gets confused with user related stuff provided by views.module, in the above case a username filter... Renamed the array index (currently on line 45) from 'users' to 'users1' and solved my particular problem. To avoid breaking the default Buddy API views I also changed line 315 accordingly.

Not sure if this is the ideal way to solve the problem or if it introduces issues in other places.

Comments

nodestroy’s picture

Status: Active » Fixed

Hi,

this should now be fixed.
(by renaming the $tables[...] keys)

regards,
dominik

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

nodestroy’s picture

Project: » Buddylist2