Create a vocabulary, add some terms, and link the vocabulary both tothe 'forum' and another content type. Create some forum entries tagged with terms from this vocabulary, then create some instances of the other content type, and tag it with some of the same terms you tagged the forum nodes with.

In the last forum post block, you get some non forum nodes showing up.

The problem seems to be in line 433 of forum. module:

$sql = db_rewrite_sql("SELECT n.nid, n.title, l.comment_count FROM {node} n INNER JOIN {term_node} tn ON tn.vid = n.vid INNER JOIN {term_data} td ON td.tid = tn.tid INNER JOIN {node_comment_statistics} l ON n.nid = l.nid WHERE n.status = 1 AND td.vid = %d ORDER BY n.nid DESC");

Changing the phrase "WHERE n.status etc." to "WHERE n.type = 'forum' and n.status etc." fixed this for me.

Comments

larowlan’s picture

Status: Active » Closed (works as designed)