Undefined array key "description_field_required" in \Drupal\file\Plugin\Field\FieldWidget\FileWidget::formElement

Created on 10 August 2023, over 1 year ago
Updated 14 March 2024, 8 months ago

Problem/Motivation

In some scenarios, when editing an entity with a file field, the following warning appears:
Warning: Undefined array key "description_field_required" in /var/www/app/docroot/core/modules/file/src/Plugin/Field/FieldWidget/FileWidget.php on line 249

Steps to reproduce

Not sure - we encountered this on taxonomy terms with file fields, which had been created before a Drupal core upgrade.

After saving the field settings, the warning did not appear.

Proposed resolution

tbc

Remaining tasks

User interface changes

none

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
File moduleΒ  β†’

Last updated 2 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom malcomio

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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