Preserve existing terms
guardian - August 24, 2007 - 16:41
| Project: | Node Auto Term [NAT] |
| Version: | 5.x-2.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
Would it be feasible to reuse existing terms in a vocabulary instead of creating a new term with the same name ???
Indeed, if the vocabulary used by NAT already contains term, when sync is performed, instead of reusing the existing terms, it just adds new terms with the same name. As a consequence, you end up having 2 "foo" terms in the vocabulary, one that existed before the association, and the one created by NAT.
regards.

#1
better title
#2
I completely agree. The way it is, you are forced to create the node first which cuts the usefulness of the module down by an order of magnitude. The perfect solution would be to have an option for the the vocabulary that said something like:
If term name already exists in this vocabulary:
[ ] Use existing term
[ ] Replace existing term with new term
[ ] Create a new duplicate term with same name (i.e., new term will have different term id)
Subscribing.
#3
Totally agree.
We are rebuilding an old site using drupal about retrogaming. Every game has a term in the 'developer' vocabulary. So, we first needed to have all the developer companies as terms. We imported them from a csv file.
Now we are using NAT to write information about new companies. Every time we want to create information for a company we've already as a term, the term name gets duplicated. And if we delete de old one... we lost the information in all the games that had that term.
The options Zach Harkey give at #2 will be perfect.
Kind regards and thanks/congratulations for this great module.
#4
It will certainly be a handy optional feature and patches are welcome. There are, however, a few impediments such as case sensitivity, deletions etc. that will need to be cleanly handled.
I would also prefer to see just a single toggle to handle this - something along the lines of "Reuse existing terms".
-K
#5
To #2, Zach Harkey:
I can't imagine why someone would like to have two different terms with the same name. Anyway, since it's the way the module is working right now, maybe it'll be handy for compatibility purposes.
To #4, Zen:
A single selection list could be enough:
I'd introduce "fuzzy mode" because it'll be helpful for my site about retrogaming. We would use NAT videogame developer companies, sometimes people write "Capcom" and others "Capcom co." (for example). It would be great if you get some kind of advise just after you send your node telling you it exists a very similar term in the database. I've seen a similar feature with CCK node relationship where you start writing the name of the node and a box showing matching nodes appears.
Kind regards.
#6
Apparently my patch is a duplicate of this thread: http://drupal.org/node/375395
Wouldn't take much to add a variable_get to make it optional.
#7
Just ran into this problem. This feature request will be very useful.
Regarding "fuzzy mode" in #5, maybe http://drupal.org/project/unitag would suit your needs.
#8
Not sure if I did something wrong or not, but the patch in http://drupal.org/node/375395#comment-1262925 doesn't seem to work for me in D6.
#9
Adding patch from #6 to this queue where it really belongs.