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"

Comments

janusman’s picture

StatusFileSize
new4.18 KB

Proposed fix attached.

janusman’s picture

Status: Active » Needs review
janusman’s picture

StatusFileSize
new2.62 KB

Please ignore patch from #1; new patch (the regexp were not working).

janusman’s picture

StatusFileSize
new3.11 KB

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

BarisW’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me, patch is working great :)
Thanks a lot!

dragonwize’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.9 KB

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

dragonwize’s picture

Status: Needs review » Fixed

Committed to dev.

Status: Fixed » Closed (fixed)

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