Tool to migrate terms when switching from "Save only the deepest term" to "Save term lineage"

Summit - August 29, 2008 - 13:03
Project:Hierarchical Select
Version:6.x-3.x-dev
Component:Code
Category:feature request
Priority:minor
Assigned:Unassigned
Status:postponed
Description

Hi Wim,

I have already a lot of nodes which are attached to taxonomy though using your great module, thanks!
But when I swith HS configuration Save Lineage from Save only the deepest term to Save term lineage I have a problem.
Content which was made with one option, say Save only the deepest term, do not show the right taxonomy term anymore when using the other option, say Save term lineage on node/edit. The term-list is empty then.
When I switch back the HS configuration Save only the deepest term the terms show again!

How to solve this please. I do not want my Nepales users just clicking submit and loose the terms attach, but I would very much switch HS configuration option to Save term lineage...

Thanks for going into this!
greetings,
Martijn

#1

Summit - August 29, 2008 - 15:22
Priority:normal» minor

Hi Wim,

I think I understand why sometimes the linke is blank or only the parent term.
May be possible to build a conversion submodule or something which can tell what the middle term is if only the parent and subchild where chosen. This is in mine situation the case.

Say a node is tagged Nepal - Kathmandu, it misses the region Kathmandu Valley.
So with Save term lineage it only shows Nepal.
I had to alter all nodes manually to get Nepal - Kathmandu valley - Kathmandu showing.

An automated update tool would be nice for this situations, but no priority I think..

greetings,
Martijn

#2

Wim Leers - August 29, 2008 - 18:07
Title:Switching from Save only the deepest term to Save term lineage old terms gone» Tool to migrate terms when switching from "Save only the deepest term" to "Save term lineage"
Version:5.x-3.0-rc3» 5.x-3.x-dev
Category:support request» feature request
Status:active» postponed

This is documented and simply an error on your side. It means you didn't think it through enough. I can understand that your requirements change, but this really is a big change on the "data side", whereas HS really is only for the "presentation side". Nevertheless, you're right that such a tool would be useful. However, I won't write this myself, I have absolutely no personal interest in it.

So until somebody contributes this, it won't happen I'm afraid.

#3

Summit - August 29, 2008 - 22:11

Hi Wim,

You are right it is a stupid mistiake on my site. Would be nice if I could automate the change.
I did it now manually and now the terms are working great again.
Your module is really a big plus importing data with Drupal!

greetings,
Martijn

#4

Wim Leers - November 29, 2008 - 22:45

Also see this comment of mine: http://drupal.org/node/333065#comment-1131512.

#5

Wim Leers - March 11, 2009 - 22:23
Version:5.x-3.x-dev» 6.x-3.x-dev

#6

Liberation - March 23, 2009 - 23:00

I ran into this problem and had to write a quick hack to fix it up (unfortunately not really a viable patch). What I'd just like to point out is that the taxonomy system is a directed graph, not a pure tree: i.e. nodes can have more than one parent. In this case, it is ambiguous which parent was originally meant should you try to establish it from just the child item.

For example, I had a taxonomy of USA states and counties, and there is a "Clay County" in Alabama, Arkansas, and Florida. This makes it essential to store the full term lineage, as if you only had the county you could not derive the state retrospectively.

Possibly the documentation should warn more strongly that full term lineage is likely to be the best choice.

#7

Wim Leers - March 24, 2009 - 10:22

It's definitely not HS' responsibility, because I don't alter the Taxonomy module's internals in any way. But I guess fairly many people only realize this through HS, so it's appropriate I guess.

Would you like to write the small bit of text that'll be added to README.txt, Liberation? :)

 
 

Drupal is a registered trademark of Dries Buytaert.