Jump to:
| Project: | Views Tagadelic |
| Version: | 6.x-1.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
views_tagadelic suffers from the same problem as tagadelic in that it counts revisions and weights tags incorrectly - especially noticeable with a lot of changes.
solved for tagadelic here http://drupal.org/node/250818#comment-1736126
i applied this to theme/theme.inc
change$vid_restrictor = ' AND d.vid IN ('. implode(',', $vids) .')';
to$vid_restrictor = ' AND td.vid IN ('. implode(',', $vids) .')';
and
$result = db_query_range('SELECT COUNT(*) AS count, d.tid, d.name, d.vid FROM {term_data} d INNER JOIN {term_node} n ON d.tid = n.tid WHERE n.nid IN '. $nid_restrictor . $vid_restrictor .' GROUP BY d.tid, d.name, d.vid ORDER BY count DESC', 0, $options['size']);
to$result = db_query_range(db_rewrite_sql('SELECT COUNT(*) AS count, td.tid, td.vid, td.name, td.description FROM {term_data} td INNER JOIN {term_node} tn ON td.tid = tn.tid INNER JOIN {node} n ON tn.vid = n.vid WHERE tn.nid IN '. $nid_restrictor . $vid_restrictor .' GROUP BY td.tid, td.vid, td.name, td.description HAVING COUNT(*) > 0 ORDER BY count DESC'), 0, $options['size']);
don't know what i'm doing but it seems to work.
Comments
#1
Hi David
I have same problem, thank you for the solution
I tried 6.x-1.x-dev this issue still exist
Here is my code with little modification on 6.x-1.x-dev ($nid_restrictor changed to $base_restrictor)
$result = db_query_range(db_rewrite_sql('SELECT COUNT(*) AS count, td.tid, td.vid, td.name, td.description FROM {term_data} td INNER JOIN {term_node} tn ON td.tid = tn.tid INNER JOIN {node} n ON tn.vid = n.vid WHERE tn.nid IN '. $base_restrictor . $vid_restrictor .' GROUP BY td.tid, td.vid, td.name, td.description HAVING COUNT(*) > 0 ORDER BY count DESC'), 0, $options['size']);Rizqi
#2
Thanks guys, I made a few modifications and committed: http://drupal.org/cvs?commit=384666
#3
Automatically closed -- issue fixed for 2 weeks with no activity.