If View type = Tagadelic and filter option Node:distinct is enabled two GROUP BY will be generated

O_o - April 26, 2007 - 09:13
Project:Views Tagadelic
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

If one creates a block view with View type = Tagadelic and have set the filter option Node:distinct this will lead to an error in the following SQL query. The error is because there are two GROUP BY statements of which "GROUP BY node.nid, random_sort" is created by the View module and "GROUP BY d.tid, d.name, d.vid" is created by Views Tagadelic module. I later discovered that the Node:distinct filter wasn't needed so one can easily go around the bug. But it should be fixed anyway.

SELECT COUNT(*) AS count, d.tid, d.name, d.vid
FROM intranetterm_data d
INNER JOIN intranetterm_node n ON d.tid = n.tid
INNER JOIN intranetnode node ON n.nid=node.nid
LEFT JOIN intranetterm_node term_node ON node.nid = term_node.nid
LEFT JOIN intranetterm_data term_data ON term_node.tid = term_data.tid
AND term_data.vid IN ('1')
WHERE d.vid IN (1)
AND (node.type IN ('faq_page'))
AND (term_node.tid IS NOT NULL)
AND (term_data.tid IS NOT NULL)
GROUP BY node.nid, random_sort
GROUP BY d.tid, d.name, d.vid
ORDER BY count DESC LIMIT 0, 50

 
 

Drupal is a registered trademark of Dries Buytaert.