Hi,

Thanks for this module. It almost does exactly what I need.

I need to import a large taxonomy of 15,000+ terms. Many have more than one parent. I thought I could make a test taxonomy with terms with multiple parents and export it so I could see how to structure the code for importing. However, when I do this, the terms with multiple parents do not have multiple parents any more after importing. See attached figure.

So, is it possible to import terms with multiple parents? If so, what is the correct syntax? I have tried various things: repeating the line with the second parent ID, leaving terms blank etc but nothing I have tried works.

Thanks for any pointers...

Comments

namwebs created an issue. See original summary.

el1_1el’s picture

Category: Support request » Feature request

I dont think I ever looked at terms with multiple parents. And after a quick test, it doesnt work. It just grabs the first parent. I'll change this to a feature request and look into it

namwebs’s picture

That'd be great, many thanks.

el1_1el’s picture

Status: Active » Needs review
StatusFileSize
new5.35 KB

@namwebs could you please try this patch and let me know? I tested on a very simple taxonomy and it sounds like yours would be much better. Thanks!

  • el1_1el committed 3f7ee57 on 8.x-1.x
    Issue #2909158 by el1_1el, namwebs: How to import terms with multiple...
el1_1el’s picture

Component: Documentation » Code
Assigned: Unassigned » el1_1el
Status: Needs review » Patch (to be ported)

I added this feature and fixed some bugs i found while working on it. released to dev branch. Please verify its working before i tag as alpha2. Thanks!

namwebs’s picture

StatusFileSize
new152.82 KB

Hi el1_1el,

Thanks for the dev version. I've tested it on a simple taxonomy and it seems to have some issues. See attached file.

el1_1el’s picture

Hmm, that is expected behavior if you imported the exported terms into the same drupal instance. The module does not overwrite existing terms. I did a similar test but deleted the existing terms before reimporting them. If you want to copy the same terms into the same instance, you have to uncheck export IDs.

Does that make sense?

namwebs’s picture

Okay... I was importing into a different taxonomy but, yes, it makes sense! I'll test again.

namwebs’s picture

Yes, it seems to be working as it should. Thanks.

el1_1el’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

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