3

How can I change vocabulary of some taxonomy term? And keep all its data - tid, references, fields, alias and translations (except hierarchy)?

3

2 Answers 2

1

Term merge module seems to be what you are looking for. Just adding some features as is from its project page on D.O.

Updating term references in the field values, swapping values from the branch term to the trunk term. We support taxonomy term reference, entity reference, and any other field types that correctly define their foreign keys.

Keeping/Removing branch terms: you decide whether to keep or remove branch terms after the merge.

Merging field values: you can specify a list of fields and during merge the values of those fields from branch terms will be added to the values of the trunk term. This way you can keep field values of the branch terms after deleting them.

So all you'll need to do is to create a new term to that other vocabulary and do a merge with the old term from the other vocabulary. As for the tid I don't think that is possible to be kept or even if there is any meaning in trying to do so since all data will be transferred to the new term.

1
  • I tried using the Term Merge module, but I'm having an issue of PHP running out of memory attempting to merge a term with a large number of references > 4,000. Now I'm looking into doing this manually, so if anyone has suggestions, I'd love to hear them. Jun 29, 2017 at 20:07
1

You can use the Taxonomy Manager module

This module provides a powerful interface for managing taxonomies. A vocabulary gets displayed in a dynamic tree view, where parent terms can be expanded to list their nested child terms or can be collapsed.

The Taxonomy Manager has following operations and key features:

  • dynamic treeview
  • mass deleting
  • mass adding of new terms
  • moving of terms in hierarchies merging of terms (using the Term merge module in 7.x)
  • fast weight changing with up and down arrows (and AJAX saving)
  • AJAX powered term editing form
  • simple search interface
  • CSV Export of terms
  • i18n support for multilingual vocabularies (per language terms)
  • Double Tree interface for moving terms in hierarchies, adding new translations and switching terms between different vocabularies

For using the Taxonomy Manager you should have JavaScript and automatically load of images enabled in your browser.

3
  • 2
    Why make it complicated, if there is a module for it, n'est-ce pas? Dec 23, 2016 at 13:53
  • 1
    taxonomy manager is has not implemented MOVE yet in drupal 8 branch
    – GiorgosK
    May 25, 2017 at 8:17
  • No move functionality even on Drupal 9. I confirm what said by @GiorgosK Jun 22, 2022 at 8:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.