I setup a List (text) field for tagging nodes with language names.

Project X
- languages: Dutch; French; English, British

"English, British" is an existing value. I can select "English, British" using autocomplete deluxe, but I can't save the node (looks as if nothing happens). Without Autocomplete deluxe, I could type this:
Dutch, French, "English, British" and it would accept the 3 values.

Comments

Anonymous’s picture

Problem seems stranger, it's not the comma that prevents saving, but the spaces.

аҧсуа бызшәа (Abkhazian) can't be saved (node form is "reloaded", but no Drupal message, no watchdog warning, jus doesn't save)

andykisaragi’s picture

Do you still have this problem with only latin characters?

jneubert’s picture

Component: Code » Single values - allow new values

I too could not insert tags (predefined field_tags) which contained commas. Quoting the input with single or double quotes didn't work either.

alex.skrypnyk’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta5
Status: Active » Needs review
StatusFileSize
new1.84 KB

Attached patch against 7.x-1.0-beta5 and solves the issue.

jneubert’s picture

The patch works fine for me. Thanks a lot - Joachim

IWasBornToWin’s picture

I'm using latest dev, can I use this patch?

IWasBornToWin’s picture

I answered my own question...no. Actually, I cant get the patch to work with any version. It says it partially applied the patch. None of my taxonomy with commas will show in the dropdown list with any version with the patch applied.

bgilhome’s picture

Version: 7.x-1.0-beta5 » 7.x-1.x-dev
StatusFileSize
new2.16 KB

Here's the patch to apply against the latest dev release. It also prevents any terms containing a comma from being added to the vocabulary as 2 new (exploded) terms.

Tested with Content Taxonomy Autocomplete.

sepgil’s picture

Component: Single values - allow new values » Multiple values - allow new and deny new values

@bgilhome: Thx for the patch, but currently I can't commit it since it breaks the usability.
For example, you won't be able to enter terms in double quotes with a comma in between( like "British, English"), since Autocomplete Deluxe will add anything as a new term as soon as you hit the comma key.
The characters enter won't get also get highlighted in the result list.

btw: It would be nice, if could add comments explaining the regular expressions to the patch.

yannou’s picture

In order to help the developpment of this very good module. Note that I have activate Content taxonomy to avoid creation of new terms.

  • I applied the patch to the last dev version (06/21)
  • when i search a term with simple quote (like "something ' other thing"), autocomplete suggests the good result BUT when I click on it term is not added to my field (and it seems it crashes, no 'tag' is rendered)
  • when i search a term with comma, autocomplete suggests the good result, when i click on it, term is rendered as 'tag' BUT when I save, it considers as a new term, so cannot add it because of my restriction

Thanks for your work

drclaw’s picture

@sepgil: Why not remove the auto-commit-term-on-comma-keypress functionality? You can already add items using the enter key. I didn't even know commas would auto commit the term until I read this thread (I came across this thread while searching for a different issue). In fact, the whole idea of using commas to separate values isn't even necessary with this widget anymore. I feel like the only reasons someone would even try to use a comma as an item separator would be if they were used to the core autocomplete widget. Any new user would expect that the comma would just get processed as part of the term name. Ideally, IMHO, commas should be handled as part of the term name, and only enclosed in double quotes in the hidden autocomplete field.

@yannou The issue you are describing is unrelated to this issue. I was having that same problem, however, with single quotes so I have opened up separate issue for it. #1695042: Single quotes (apostrophes) in term name breaks widget for deny new value lists

Thanks!
drclaw

vishaljaura’s picture

Hi,

I have tried by applying both the pathes suggested above manually in files. But I am getting same errors ( Auto Del: title mismatch. Please check your selection. )while saving multiple fields. Please someone help me. I am trying to resolve this issue for last 2-3 days.

Thanks

rasor’s picture

Subscribe

drclaw’s picture

Component: Multiple values - allow new and deny new values » Single values

Comment deleted: Moving to a new ticket.

drclaw’s picture

And that new issue is #1780378: Comma Key Functionality

cangeceiro’s picture

StatusFileSize
new3.3 KB

The patch worked fine for me, but as expressed in #9 there where issues typing in terms surrounded in quotes. here is an update to the patch that doesnt break usability

aabdullahh’s picture

does anyone has the problem in Arabic letter "و" that uses the comma key!!?

dubois’s picture

Re-rolled patch against 7.x-1.0-beta7; removed trailing whitespace; now applies cleanly with git (and thus drush_make).

Pasiaulis’s picture

hi all! In my workflow, I often copy/paste terms from word/pdf to taxonomy reference term field. Using Autocomplete deluxe puts all terms as one, e.g. If I copy line "Nikohl Boosheri, Sarah Kazemy, Reza Sixo Safai", it gives me one term when all the names should come separate. If I write them individually, the comma makes them output separately but not when pasting the line. Writing all terms is just a little bit slow and it would be nice if I could just copy&paste. Is this possible any way?
Drupals core taxonomy reference field works with pasting but I like Autocomplete Deluxe better in every other way.

pianomansam’s picture

I'm leaving this issue open as the issue related to 7.x-1.x. But I'm adding the 7.x-2.x related issues to this for reference.

LNakamura’s picture

Status: Needs review » Closed (outdated)

Thanks, everyone. As @pianomansam indicated, there is a related issue for 7.x-2.x, which has been fixed. However, this issue concerns Lists and 7.x-1.x, neither of which are supported any longer - therefore, I'm closing this ticket as outdated.