Error when views filter list contains "node : author name"

cailinanne - September 23, 2007 - 19:40
Project:Views Tagadelic
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

If the view contains the "node : author name" then you get an error message similar to :

user warning: Unknown column 'users.uid' in 'where clause' query: SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM term_data d INNER JOIN term_node n ON d.tid = n.tid INNER JOIN node node ON n.nid=node.nid WHERE d.vid IN (1) AND (node.type IN ('blog')) AND (users.uid IN ('19')) GROUP BY d.tid, d.name, d.vid ORDER BY count DESC LIMIT 0, 10 in /var/www/drupal/includes/database.mysql.inc on line 172.

This can be fixed by adding

$where = str_replace('users.uid','node.uid',$where);

in the theme_tagadelic_display method just above the $result = db_query_range... line.

The use case in which I encountered this seems like a relatively common one. On my site, each user is allowed to free tag their blog entries. I would like to create a separate tag cloud for each user's blog.

 
 

Drupal is a registered trademark of Dries Buytaert.