Fetching null "data" for tid 0 may cause duplicate, malformed lineage

xjm - October 22, 2009 - 18:45
Project:Taxonomy Lineage
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

In {taxonomy_hierarchy}, top-level terms have entries with the parent ID set to 0. The recursive term update function in this module, lineage_update_term_r(), attempts to fetch data for this "fake" parent term, which results a lineage being added for term 0; subsequently duplicate, malformed lineages like the following are created for each term:

10Last term in table
10
10Some root-level term

10Last term in table
10
10Some root-level term
12Some child term

The attached patch resolves this issue by discarding these "empty" data rows for terms that don't exist. (Note: I've made the patch against 6.x-1.0 release instead of the current dev build or HEAD because, somehow, the release is nine months newer than either?)

AttachmentSize
lineage_6_1-0_fix_parent_zero.patch701 bytes

#1

xjm - October 22, 2009 - 18:45
Status:active» needs review

#2

Justin W Freeman - November 15, 2009 - 05:21
Status:needs review» fixed

Committed

#3

System Message - November 29, 2009 - 05:30
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.