Download & Extend

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

Project:Taxonomy Lineage
Version:6.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

Status:active» needs review

#2

Status:needs review» fixed

Committed

#3

Status:fixed» closed (fixed)

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

nobody click here