Thanks for this cool mod - I found a small problem that occurs only when more than one term/category is assigned to a node. My categories are setup to allows nodes to have more than one term in each vocabulary. What happens is the nodes are listed in the Latest Articles block for each term assigned to it. For example, I have a node title "New Book Released" that is assigned to the terms: "News" and "Publications". This item would appear twice in the Latest Articles block. I fixed this problem very easily by inserting the DISTINCT operator into the SELECT statement to return only unique values:

File: article.module

#--[LINE 352]-----------
#--[FIND]---------------

if ($operator == 'or') {
$str_tids = implode(',', call_user_func_array('array_merge', $descendant_tids));
$sql = 'SELECT n.nid, n.title, n.sticky, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC';

#--[LINE 352]------------
#--[REPLACE WITH]------

if ($operator == 'or') {
$str_tids = implode(',', call_user_func_array('array_merge', $descendant_tids));
$sql = 'SELECT DISTINCT n.nid, n.title, n.sticky, n.created FROM {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY n.sticky DESC, n.created DESC';

Comments

Anonymous’s picture

Status: Fixed » Closed (fixed)