Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The merge options in the taxonomy edit form are not (IMO) clearly documented.
The checkbox options provided are,
* Collect all parents of selected terms an add it to the merged term
* Collect all children of selected terms an add it to the merged term
* Collect all relations of selected terms an add it to the merged term
The README.txt says this (but doesn't reference those options) -
- Merging
With the merging action, you can put terms with the same meaning together (e.g. your vocabulary
contains: SoC, Summer of Code, GSoC, Google Summer of Code). All terms, that get merged into
one other, get synonyms of resulting term (here called merged or main term). Additional
all term-node association gets automatically updated (this means nodes, that had a merging term
assigned, now get the resulting merged term instead). All merging terms are deleted afterwards.
In the Taxonomy Manager, you can do that by selecting all terms you want to merge and to click
the 'Merge' button. A fieldset with an autocomplete field an some options expands. In the
autocomplete field you have to specify the resulting merged term (into which the selected get merged).
The merged term can be either chosen from the list of existing terms or can be inserted automatically
and used as merged term.
Additional, there are some options available (they depend on the vocabulary settings). If you want
to add any kind of relations (parents, children, related terms) from the merging terms to the
resulting merged term, select one (or more) of them.
The default taxonomy term page, which shows all assigned nodes, is overriden by the Taxonomy
Manager, so that former merged terms can be considered (if someone calls a term, that was merged,
it redirects to the resulting merged term).
NOTE: At the moment, the Taxonomy Manager only cares about the term-node association inserted
into the term_node table (by the taxonomy module). If you are using any CCK modules, like
CCK Taxonomy or Content Taxonomy, which (can) save the term - node association in cck tables,
don't use the Merging action, because changes are not handled.
If you are using Views filters instead of the default taxonomy term page, merged terms are
either respected.
If you want to customize this by yourself or have some other module, you can use following
function taxonomy_manager_merge_get_main_term($tid) for getting the main term id (if there
is any main term, else return 0). The term merge history gets saved in the
taxonomy_manager_merge table (main_tid, merged_tid) and gets additional cached, so that
checking for a merged terms causes nearly no performance loss.
Comments
Comment #1
xurizaemonFurther docs from the source (but repetitive, not any more helpful eg if user unsure of the meanings of "relations" or "children")
Comment #2
xurizaemonAs I understand it, the options should do the following.
May I suggest this text as a replacement? (note that the current code uses 'an' where I think it means 'and').
* Collect Parents - add parent terms of merged term to main term.
* Collect Children - add child terms of merged term to main term.
* Collect Relations - add related terms of merged term to main term.
This would clarify that we're referring to child terms, not child nodes (which will be automatically merged).
(Having created this issue, I realise that the option labels are about as straightforward as they need to be to begin with ... and that the README.txt does mention them in passing, but without expanding or detailing what the options do.)
Comment #3
ivnish CreditAttribution: ivnish commented