This patch fixes two bugs:

1) If i set the view type be anything other than 'Lineage: Nexted taxonomy summary' it throws the following query errors:

Warning: Unknown table 'term_lineage' in where clause query: SELECT count(node.nid) FROM node node WHERE (node.type IN ('content_link')) AND (term_lineage.lineage LIKE '%0Wind %') in /var/www/shared-drupal/includes/database.mysql.inc on line 121

Warning: Unknown table 'term_lineage' in where clause query: SELECT node.nid FROM node node WHERE (node.type IN ('content_link')) AND (term_lineage.lineage LIKE '%0Wind %') LIMIT 0, 10 in /var/www/shared-drupal/includes/database.mysql.inc on line 121

This was because the term_lineage.lineage field was not added to the filter query.

2) In a view I create with the Lineage Term branch argument it will only return results if the node is assigned a taxonomy term that is the highest weighted term in a list of terms.

So if I have this taxonomy
term
-- a term
-- b term

It will only return results if i am looking for 'a term' nodes. This was because the where clause was looking for term_lineage.lineage LIKE '%0$arg\n%' which doesn't seem to match the format stored in the term_lineage table. The first number (i believe) is the term weight.

Comments

Zack Rosen’s picture

StatusFileSize
new736 bytes

cleaned up the add_where() so it uses the query builder argument handling

merlinofchaos’s picture

Status: Needs review » Fixed

Applied.

Anonymous’s picture

Status: Fixed » Closed (fixed)