Environment

Drupal 6.19
Hierarchical Select 6.x-3.6

Configuration

I have simple hierarchy of tags:

  • Human Resource -> Absence Management -> Time Off.
  • Employees -> Time Management

I'm using lineage hierarchical select for taxonomy.
"Human Resource -> Absence Management -> Time Off" tags are assigned to a node.

Bug

I re-ordered taxonomy and moved "Time Off" and placed it under "Employees -> Time Management" .
I am editing the node and:

  • the "Time Off" tag is no longer assigned to post under old ancestors "Human Resource ....". CORRECT
  • the "Human Resource -> Absence Management" are still assinged to node - CORRECT
  • the "Time Off" with its new ancestor "Employees -> Time Management" is not assigned to a node - WRONG

So effectively re-organization of taxonomies and reediting nodes will cause loosing tags that has been moved during taxonomy re-organization.

I think this is related to #976394: Save term lineage does not work with current multilevel taxonomies

Comments

Peter Swietoslawski’s picture

On a note side core Taxonomy module behaves as expected. You have a hierarchy of tags assigned to a post, you reorganize taxonomy, you reedit the post and all the tags that used to be assigned to a node are still highlighted in tags selection box (of course the new ancestors for the tags that have been reorganized are not selected but that's expected and that's why we need "lineage save" option from Hierarchical Select module :) )

wjaspers’s picture

Priority: Normal » Critical

I'm upgrading this priority to "critical" because I found a similar, yet more disturbing problem.
I lost ALL of my product catalog term assignments by changing the lineage setting.

Views couldn't even locate (even with the HS Views module OFF) items that were tagged before enabling and adjusting the HS module settings.

wjaspers’s picture

Discovered this afternoon that the problem stems from HS's cache tables. I have a feeling they aren't being flushed on the same cache flushes as the rest of the site.

I solved the problem by resolving it the dangerous way: mysql>TRUNCATE table cache_hierarchical_select; (not recommended).

Wim Leers’s picture

Category: bug » support
Status: Active » Closed (works as designed)

Due to the nature of saving the lineage, there is no work-around possible for this. You have to make sure that you don't need to alter any lineages, because otherwise the saved lineages will of course no longer be entirely correct.

This is NOT a bug. It's a limitation of core's Taxonomy.

If you don't want this problem, then don't use vocabularies in which you have terms with multiple parents. Then you don't need to use the "save lineage" functionality, and then you don't have this problem. I'm sorry, but there really isn't anything I can do about this.

jcisio’s picture

Version: 6.x-3.6 » 6.x-3.x-dev
Category: support » bug
Priority: Critical » Major
Status: Closed (works as designed) » Active

Wim Leers,

I reopen this because I think:
- The core Taxonomy module does thing right: for example, when a term is deleted, it is also deleted from term_data. HS does not do that on its CCK field.
- There is a work-around: use hook_taxonomy to reset the lineage on term save/del.

jcisio’s picture

Assigned: Unassigned » jcisio
jcisio’s picture

Assigned: jcisio » Unassigned

A few comments:

  • A drag-n-drop in taxonomy admin UI could change dozens of terms, results in changes in many many nodes. It needs a serious implementation for scalability.
  • Auto lineage re-assignation will take more time than I thought.
  • Auto lineage re-assignation causes problem with multiple parent terms.

So, I use hook_taxonomy() in my custom module to solve my specific problem. Sorry that it did not result in a patch for HS, but it would take too much time for me. I let Wim Leers leave this as "active" or "won't fix" this, as it is a real bug.

stefan.r’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

6.x issue without activity for over 3 years, closing.

Please reopen if this is still an issue in 7.x.