If a term with a comma is selected, then another term is selected after it, the term with the comma loses its [tid:##] value and then that term is not saved.

Steps to reproduce:

1. Requires a taxonomy vocabulary with multiple terms, at least one of which with a comma in the name. (Example: A Tags vocabulary containing terms "Plain tag 1", "Plain tag 2", "Tag 3, with, commas")
2. Add a Term Reference field to a content type, with the Hierarchical autocomplete term reference widget, and an Unlimited number of values.
3. Open that add node form for that content type. In the term reference field, type Tag 3 and select the tag with commas. It will appear as "Tag 3, with, commas"[tid:3]
4. Click into the term field again, type a comma and then Plain tag. Select Plain tag 1. Now the field will read "Tag 3, with, commas", Plain tag 1[tid:1]
5. Click the field one more time, type a comma and then Plain tag. Select Plain tag 2. Now the field will read "Tag 3, with, commas", Plain tag 1[tid:1], Plain tag 2[tid:2]
6. Save the node, and you will see that Plain tag 1 and Plain tag 2 are saved, but Tag 3, with, commas is not.

Comments

LittleViking created an issue. See original summary.

littleviking001’s picture

Attaching a patch. The issue is that the module uses core functions drupal_explode_tags() and drupal_implode_tags() but doesn't exactly match the format that core uses for typed tag lists. (Specifically, the [tid:##] part is not handled well by those core functions.) This patch adds custom functions similar to those to support this edge case.

littleviking001’s picture

Status: Active » Needs review