Hello,
I've noticed, that module do not use db_rewrite_sql function when fetching number of nodes for categories. So I could get empty categories in list even if I've turned off showing empty categories (and of course, it show wrong count of nodes). The problem lies in the function term_has_nodes(); Here is quick fix:
Instead (taxonomyblocks.module: #782)
$nid = db_result(db_query("SELECT tn.nid FROM {term_node} tn, {node} n WHERE tn.tid = %d AND n.nid = tn.nid AND n.status = 1 ", $tid));
Place:
$nid = db_result(db_query(db_rewrite_sql("SELECT n.nid FROM {term_node} tn, {node} n WHERE tn.tid = %d AND n.nid = tn.nid AND n.status = 1"), $tid));
Unified patch attached. Didn't checked other queries yet, but I suspect there will be similar problems with fetching taxonomies terms (my project not using filtering by TID, just NID, so I can't check it)
Comments
Comment #1
mrfelton commentedThis is a problem when used with access permission modules like taxonomy_access_control or tac_lite. Attached patch fixes for me. Builds on the previous version of this patch, but also reworks the SQL to use joins correctly as this was causing errors when used with tac_lite
Comment #2
PixelClever commentedFixed in latest release.
Comment #3
PixelClever commented