Parent terms aren't recursively checked
sliph - May 1, 2009 - 18:02
| Project: | Taxonomy CSV import/export |
| Version: | 6.x-3.1 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
When creating a hierarchical taxonomy, if a term's parent matches any other term, regardless of depth, it will be matched to that parent.
For instance, a CSV file containing:
Food, Chinese, Fried noodles
Food, Indian, Samosa
Animal, Chinese, ChickenBecomes, after import:
Animal
Food
Chinese
Chicken
Fried noodle
Indian
Samosa
#1
Hi,
Duplicate terms are one of the main problem to resolve in taxonomies imports. Simple taxonomies have only one parent, but in your case, it seems "Chinese" has two parents. It's possible, but currently, taxonomy_csv doesn't know if you want above or :
AnimalFood
Chinese
Chicken
Fried noodle
Indian
Samosa
In fact, you should always indicate all the hierarchy for each term to avoid these type of problem:
Animal, Food, Chinese, Fried noodlesAnimal, Food, Chinese, Chicken
Animal, Food, Indian, Samosa
or in short way:
Animal, Food, Chinese, Fried noodles, , , Chicken
, , Indian, Samosa
Regards,
Daniel Berthereau
Knowledge manager
#2
Sorry, I wasn't really clear.
I pass it:
Food, Chinese, Fried noodlesFood, Indian, Samosa
Animal, Chinese, Chicken
I want:
AnimalChinese
Chicken
Food
Chinese
Fried noodle
Indian
Samosa
I get:
AnimalFood
Chinese
Chicken
Fried noodle
Indian
Samosa
How I got around this issue:
Modified:
Food, Chinese, Fried noodlesFood, Indian, Samosa
Animal, Chinese, Chicken
to be:
Food, Food#Chinese, Fried noodlesFood, Food#Indian, Samosa
Animal, Animal#Chinese, Chicken
And then ran SQL against my drupal DB to remove everything before & including the # in Taxonomy. (This is just an example - I had about 150 taxonomy terms in a similar heirarchy)
#3
Hi,
Happy you've found a solution to import your terms.
In some cases, term "Chinese" may be difficult to use, unless articles are described by more than one term and users think to use more than one word to find something.
I 'm currently working on import of duplicate terms.
Daniel Berthereau
Knowledge Manager
#4
Hi,
New release 6.x-4.1 of Taxonomy csv resolves this issue. It recognizes automatically this type of import and creates the good hierarchy.
Best regards,
Daniel Berthereau
Knowledge manager