Required checkbox has the wrong value when using the default (Core) Required API plugin

Created on 10 July 2024, 6 months ago

Problem/Motivation

When I visit the edit form of a required field and the default (Core) Required API plugin is enabled, the required checkbox is not checked, even though the field is required in config. The problem is that Drupal\Core\Field\FieldItemList::defaultValueWidget() calls $definition->setRequired(FALSE) for the default value form, and the Required API code uses that modified entity.

Steps to reproduce

Visit the edit form of any required field.

Proposed resolution

Use an unmodified version of the field config entity.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024