For example, if taxonomy/term/1 is "Emerson, Lake and Palmer", Active Tags's javascript will split it incorrectly when editing a node that already has that term assigned.
Steps to reproduce:
1) Fresh drupal install, and an autocomplete taxonomy (tags) vocabulary.
2) Create a single new node, and enter this in the autocomplete field:
"Emerson, Lake and Palmer", The Cure
3) Save node
4) Two terms are created: one for "Emerson, Lake and Palmer", and one for "The Cure".
5) Now, install, enable, configure Active Tags module
6) Edit above node. The active tags (incorrectly) shows 4 tags for the node:
"Emerson,
Lake
and Palmer"
The Cure
.. however I have not modified nor yet edited the node. There are still 2 terms in the vocabulary since the node has not been saved, and the term_node table (of course) shows there are two terms assigned to this node.
7) If you save the above node, changes are permanent; this has (incorrectly) created the new terms ""emerson", "lake", "and palmer"
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | active_tags-6-1-handle_commas_and_quotes_correctly.patch | 2.9 KB | dragonwize |
| #4 | active_tags-559176-4.patch | 3.11 KB | janusman |
| #3 | active_tags-559176-3.patch | 2.62 KB | janusman |
| #1 | active_tags-559176-1.patch | 4.18 KB | janusman |
Comments
Comment #1
janusman commentedProposed fix attached.
Comment #2
janusman commentedComment #3
janusman commentedPlease ignore patch from #1; new patch (the regexp were not working).
Comment #4
janusman commentedAnother patch. The tags being added to the hidden textfield were themselves not enclosed in quotes even though the original ones were.
Apologies =) Hope this is closer to what's needed.
Comment #5
BarisW commentedLooks good to me, patch is working great :)
Thanks a lot!
Comment #6
dragonwize commentedThis is related to several other issue that have been stalled in the queue that revolves around the handling of commas. I've decided to make a decision forward though and see how it goes.
I've written this in more of a Drupal and hopefully unbreakable way. Please review with your data sets and let me know what you think. As soon as I have some testing on this I am going to commit it and close all the issues.
Comment #7
dragonwize commentedCommitted to dev.