Entity Reference Autocomplete field cannot remove values

Created on 25 April 2022, over 2 years ago
Updated 13 March 2024, 7 months ago

Problem/Motivation

When using a Tags multi-value field (taxonomy terms) as a required field on a node, and using the Autocomplete widget, it is impossible to remove more than one value at a time when editing the node. The only value that can be removed is the last one in the list.

Steps to reproduce

  1. Add a node content type with a Tags field
  2. Set the Tags field to be required, have unlimited values allowed, and use the Autocomplete widget on the Form Display. See attached config file field.field.node.page.field_tags.yml
  3. Create some Tags taxonomy terms
  4. Create a node of the content type, and add a few tags to it, then save it.
  5. Edit the node, and try to remove the first tag in the list by selected its text and hitting backspace. Then (try to) save.
  6. The save fails validation, saying the field is required. But only one tag was removed; there are still values in the field. See attached screenshot.
  7. Try reloading and edit again, this time removing more than one Tag value. Save fails similarly.

Proposed resolution

Fix the field validation.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Closed: duplicate

Version

11.0 πŸ”₯

Component
Entity referenceΒ  β†’

Last updated 7 days ago

No maintainer
Created by

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

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