Tool to migrate terms when switching from "Save only the deepest term" to "Save term lineage"
| Project: | Hierarchical Select |
| Version: | 6.x-3.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
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
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
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
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
Also see this comment of mine: http://drupal.org/node/333065#comment-1131512.
#5
#6
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
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? :)