EntityDisplayFormBase (Form Display) throws Notices when opening field settings for Media Library Widget

Created on 15 December 2020, about 4 years ago
Updated 22 November 2024, about 1 month ago

Problem/Motivation

There is an issue I keep running into where attempting to open the Media Library field settings gear on the content-type Form Display page throws an error. The error occurs when the form attempts to get form values that don't exist. I've created a patch to essentially skip the processing if the values aren't set for that field.

Steps to reproduce

Choose media library widget on the content-type, attempt to edit it's field settings.

Proposed resolution

Skip the processing for that specific field if the values aren't set for that field.

Remaining tasks

Merge in the patch or come up with a better solution.

The error format is like this:
Notice: Undefined index: field_meta_tags in /var/www/docroot/core/modules/field_ui/src/Form/EntityDisplayFormBase.php on line 603

πŸ› Bug report
Status

Closed: duplicate

Version

9.3

Component

field_ui.module

Created by

πŸ‡ΊπŸ‡ΈUnited States grathbone

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.

  • πŸ‡¬πŸ‡§United Kingdom andybroomfield

    I'm seeing this issue on Drupal 10.3.9. This is happening on paragraphs and any custom entity (content types seems fine).
    It appears to be any field, except the first which opens fine.
    Error is
    : Undefined array key "localgov_opens_in_a_new_window" in on line

    : Trying to access array offset on value of type null in on line

    : Trying to access array offset on value of type null in on line

    : Trying to access array offset on value of type null in on line

    : Trying to access array offset on value of type null in on line

    Patch in #2 does resolve this issue.

Production build 0.71.5 2024