Line 954:
$sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.vid = t.vid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY '. $order;

should be:
$sql = 'SELECT DISTINCT(n.nid), n.sticky, n.title, n.created FROM {node} n INNER JOIN {term_node} tn ON n.vid = tn.vid WHERE tn.tid IN ('. $str_tids .') AND n.status = 1 ORDER BY '. $order;

CommentFileSizeAuthor
#6 166780.patch1.1 KBblakehall
#4 taxonomy.tar_.gz15.46 KBjim2161
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Confirmed. This bug was introduced with Drupal 6.

webchick’s picture

Status: Reviewed & tested by the community » Active

To save someone else squinting at this for 5 minutes, the error is that:

ON n.vid = t.vid

needs to be:

ON n.vid = tn.vid

(note the tn for term_node, not t)

There's no patch here, but it would be trivial to create one.

jim2161’s picture

Assigned: Unassigned » jim2161
jim2161’s picture

FileSize
15.46 KB

Upload taxonomy.tar.gz

webchick’s picture

@zamboni9: Close. But what we need is the actual fix_taxonomy.patch file uploaded here.

blakehall’s picture

Status: Active » Needs review
FileSize
1.1 KB

Patch attached (created from drupal root).

nedjo’s picture

Title: taxonomy_select_nodes $sql » taxonomy_select_nodes $sql has incorrect table alias
Status: Needs review » Reviewed & tested by the community

Looks good.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Good catch. Committed.

Anonymous’s picture

Status: Fixed » Closed (fixed)