Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
27 Jun 2009 at 18:58 UTC
Updated:
24 Jul 2013 at 08:42 UTC
Jump to comment: Most recent file
Comments
Comment #1
xanoComment #2
dries commentedWoot -- this would mean we're finally using synonyms in core.
Comment #3
xanoThis patch fixes a bug in the query that would pop up when autocompleting a tag string that didn't contain any completed tags yet. It also adds a description to the Synonym textarea in the term form that explains what synonyms do.
Comment #4
oriol_e9gSome tests for this functionality could be useful.
Comment #5
xanoThat's not possible, since it's pure JavaScript and the testing framework can't execute that.
Catch mentioned that the backend doesn't apply base terms if their synonyms are entered. This is because there can be terms and synonyms with the same name.
Comment #6
catchWe could check for term matches, if the word entered matches a term, then save it as the term. If it doesn't, but matches a synonym, save it as the 'parent' term for that synonym. If it doesn't match either, save it as a new term.
Comment #7
xanoThat's what happens now.
Comment #8
catchNope.
Create a term '1'.
Add a synonym 'one'.
/node/add/article
type 'one' into the autocomplete selection.
Save.
You get a new term 'one', not the root term '1' saved.
Getting it to save the term instead of the synonym in that case would also work without javascript, which would be testable.
Comment #9
xanoOh, of course. Perhaps it makes to wait until your permissions patch gets in and that we apply this behaviour afterwards? That would mean that this patch could get in before that.
Comment #10
catchI don't think permissions make sense for this.
Here's the various scenarios:
1. New word with no matching term or synonym - save a new term.
2. Word matches an existing term, save that term.
3. Word matches a synonym of an existing term, save the term instead.
Permissions would let you stop people doing number #1, but I don't see how it affects #3.
Comment #11
catchThere's already an issue for this over at #201269: Synonym collapsing in core with more discussion and patches. Marking this as duplicate but let's pick up with the current patch over there.
Comment #12
xano