Fix comma in string (non-delimiter) creates multiple terms

Created on 22 August 2017, over 7 years ago
Updated 15 September 2024, 3 months ago

Problem/Motivation

Follow-up to #2317797: Comma in string (non-delimiter) creates multiple terms β†’ - see #10 for 7.x-2.2

According to the release notes, terms with commas are supported since 7.x-2.0-beta1 and the delimiter can be configured since 7.x-2.0-beta3.

I have found this is not true, when adding terms via Autocomplete Deluxe.
With the delimiter configured to be ";", entering a new string "Lorem Ipsum, Dolor" will show as a single tag in the UI, but when looking at the term list, 2 terms have been added: "Lorem Ipsum" and "Dolor".



Proposed resolution

Rework autocomplete validation to use custom static function that imitates Drupal\Component\Utility\Tags::explode but uses delimiter that we specify in the form element. This way it works for new and existing terms.

Remaining tasks

  • βœ… File an issue
  • βœ… Addition/Change/Update/Fix
  • βž– Testing to ensure no regression
  • βž– Automated unit testing coverage
  • βž– Automated functional testing coverage
  • βž– UX/UI designer responsibilities
  • βž– Readability
  • βž– Accessibility
  • βž– Performance
  • βž– Security
  • βž– Documentation
  • βœ… Code review by maintainers
  • βž– Full testing and approval
  • βœ… Credit contributors
  • βœ… Review with the product owner
  • βœ… Release notes snippet
  • βœ… Release autocomplete_deluxe-2.0.4 β†’

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #2903968 β†’ : Fixed comma in string (non-delimiter) creates multiple terms
πŸ› Bug report
Status

Fixed

Version

2.0

Component

Multiple values

Created by

πŸ‡ΊπŸ‡ΈUnited States LNakamura

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024