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

Gabriel R.’s picture

I either fixed this or terribly borked it, but it did it for me.

Commenting out lines 1453,1454 in taxonomy_manager.admin.inc.

//    form_set_error('merge', t("Warning: Your input matches with multiple terms, because of duplicated term names. Please enter a unique term name") ." (". $error_msg .").");
//        $form_state['rebuild'] = TRUE;

Fingers crossed.

Gabriel R.’s picture

BTW, this worked great, I've been using it a lot. Work including in the release IMHO.

giorgio79’s picture

Which term will be deleted and which merged once you comment it out from the dupes?

mh86’s picture

Status: Active » Closed (won't fix)

Handling 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.

DamienMcKenna’s picture

Subscribe

DamienMcKenna’s picture

I'll see if I can hack something up..

mikeytown2’s picture

mh86’s picture

Title: Merge tags with duplicate names » Improve autocomplete widget to handle duplicated term names
Category: bug » feature
Status: Closed (won't fix) » Active

I 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?

mh86’s picture

Status: Active » Fixed

As 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.

Status: Fixed » Closed (fixed)

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

giorgio79’s picture

Status: Closed (fixed) » Needs work

@mh86

So which text is replaced and how?

term-id:5234

or

term-id:[5234]

or

5234:[tid]

?

Gabriel R.’s picture

IIRC, the earliest term (smallest ID) is the one that is being kept. Which is good.

chrisdfeld’s picture

After 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:

  • ParentTermA
    • ChildTermDuplicate (Drupal taxonomy ID = 123; this will be the resulting merged term)
  • ParentTermB
    • ChildTermDuplicate (Drupal taxonomy ID = 456; this term will disappear after merge)

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 text term-id should be typed literally. End result:

  • ParentTermA
    • ChildTermDuplicate (Drupal taxonomy ID = 123)
  • ParentTermB
alibama’s picture

Category: feature » bug

this 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

ssoulless’s picture

Version: 6.x-2.1 » 7.x-1.0
Priority: Normal » Minor
Status: Needs work » Fixed

Well 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

Status: Fixed » Closed (fixed)

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