When tagging a node with tags containing commas, autocomplete removes double-quotes around previously entered tags.
How to simulate problem:
1) Create terms "term, 1" and "term, 2" so that autocomplete can offer them.
2) Try to tag a node with both terms using autocomplete
2.1) When the textfield contains "term, 1" and you append , ter the autocomplete offers term, 2 and others
2.2) Click the offered term, 2
3) The first tag looses double-quotes, splitting into 2 tags term and 1
Expected behavior:
Autocomplete appends "term, 2" and leaves previous tags untouched (in double-quotes).
Current behavior:
Autocomplete appends "term, 2" but changes the original content of the textfield so that double-quotes get lost.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | tagging.patch | 679 bytes | BayerMeister |
| #10 | tagging2.patch | 846 bytes | BayerMeister |
| #9 | tagging2.patch | 881 bytes | BayerMeister |
| #7 | tagging2.patch | 889 bytes | BayerMeister |
| #5 | tagging.patch | 820 bytes | BayerMeister |
Comments
Comment #1
BayerMeister commentedI think it is here:
taxonomy.pages.inc:124:
This line concatenates the previous terms, but does not enclose them in double quotes even if needed (array of terms contains terms with commas or double-quotes inside).
I'll try to make a patch and append it here. I'll be glad to get directions on how to get this into the next update and how to make sure it gets fixed in D7 (which I don't use yet) as well.
Comment #2
BayerMeister commentedHere is a patch. No magic there, just surrounding terms with double-quotes and doubling double-quotes in them.
I tested it and it works. Should have no side effect.
Now I'd appreciate some guidance. What now?
Comment #4
BayerMeister commentedUps. I'm sorry :-/ My first patch and I did it backwards. Here this one should be OK.
Comment #5
BayerMeister commented...and with UNIX line endings...
Comment #7
BayerMeister commentedLast attempt. I downloaded the latest sources, followed steps in http://drupal.org/patch/create, used GNU diff.
It is a hard thing to contribute simple things it seems :-)
If it doesn't pass now, I'll let someone else apply it. I think the .patch file is OK.
Comment #9
BayerMeister commentedChanged name of patched file back to original, so that SimpleTest recognizes which file this is about.
Comment #10
BayerMeister commentedCleaned paths so that they are relative to drupal root.
Comment #12
BayerMeister commentedThe bug exists still in D7 and should be later backported.
Comment #13
itamair commented#12: tagging.patch queued for re-testing.
Comment #14
itamair commentedWith that patch applied, still terms separated with commas don't show in autocomplete list ...
This issue would really need a fix. Please ...
Comment #15
mr.baileysSeems like a duplicate of #1000736: Term reference autocomplete widget having problems handling terms with commas