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.
Currently, there is no way to merge tags with duplicate names, Taxonomy Manager throws an error...
Warning: Your input matches with multiple terms, because of duplicated term names. Please enter a unique term name (Austria: 324, 443, 449).
Comments
Comment #1
Gabriel R. CreditAttribution: Gabriel R. commentedI either fixed this or terribly borked it, but it did it for me.
Commenting out lines 1453,1454 in taxonomy_manager.admin.inc.
Fingers crossed.
Comment #2
Gabriel R. CreditAttribution: Gabriel R. commentedBTW, this worked great, I've been using it a lot. Work including in the release IMHO.
Comment #3
giorgio79 CreditAttribution: giorgio79 commentedWhich term will be deleted and which merged once you comment it out from the dupes?
Comment #4
mh86 CreditAttribution: mh86 commentedHandling duplicated term names with the autocomplete widget is difficult. At the moment the only possible ways are either to have unique name (e.g. by temporarily renaming one term) or to improve the input widget to accept term ids.
Marking this issue as "won't fix", because we cannot change the validation in this way. If someone comes up with an idea or patch for an improved autocomplete widget (which maybe accepts additionally the term id), you can open another feature request issue.
Comment #5
DamienMcKennaSubscribe
Comment #6
DamienMcKennaI'll see if I can hack something up..
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedsubscribe #608738: Warning: Your input matches with multiple terms
Comment #8
mh86 CreditAttribution: mh86 commentedI thought a little bit about this issue and one solution, which should be easy to implement, would be having a fixed prefix indicating a term id, e.g. you type "term-id:123" into the autocomplete.
what would you say for this solution?
Comment #9
mh86 CreditAttribution: mh86 commentedAs suggested in my previous post, I extended the autocomplete widget so that someone can directly enter the term id. If you want to enter the term id, you have to use following syntax: "term-id:[tid]" (added this information as well to the description of the autocomplete fields and to the duplicate entry warnings).
The changes are available in the latest dev snapshot.
Comment #12
giorgio79 CreditAttribution: giorgio79 commented@mh86
So which text is replaced and how?
term-id:5234
or
term-id:[5234]
or
5234:[tid]
?
Comment #13
Gabriel R. CreditAttribution: Gabriel R. commentedIIRC, the earliest term (smallest ID) is the one that is being kept. Which is good.
Comment #14
chrisdfeld CreditAttribution: chrisdfeld commentedAfter some trial and error, here's what worked for me. Say you have 2 taxonomy terms with identical names that you'd like to merge, like this:
You've got to hover over each duplicate term and inspect the link URL to get the tid. For example, the URL /admin/content/taxonomy_manager/termdata/99/123 tells us that the tid is 123. (99 would be the vocabulary ID.) Make note of the tid for the term you'd like to keep.
Then when you go to enter the "Resulting merged term", don't type the name of the term. Instead, type this:
term-id:123
Where
123
is the tid of the term you want to keep. The textterm-id
should be typed literally. End result:Comment #17
alibama CreditAttribution: alibama commentedthis sorta blows - accidentally typed in term-id:[1234] instead of term-id:1234 - it deleted both terms and didn't create term-id:[1234] term to fix with... my solution has been to go to create a new term then go to the taxonomy_manager_merge table and manually add the new term where the 0 was - am definitely interested in testing a fix - less happiness reigned in the empire
Comment #18
ssoulless CreditAttribution: ssoulless commentedWell in V7 all works ok, you just put
term-id:[the id of your term]
and it catches the term you are looking for with out any problem
So just update to drupal 7