Problem/Motivation

The following fatal error is thrown when the third party settings are added to a media field in a form display while extra_field_description module is enabled.

Cannot use object of type Drupal\Core\Render\Markup as array in claro_preprocess_fieldset__media_library_widget() (line 1582 of /core/themes/claro/claro.theme).

Issue is present on default drupal admin themes seven/claro.

Steps to reproduce

  1. Install and enable extra_field_description module
  2. Add a media field to a content type
  3. Enable the media field in the default form display
  4. Modify it's third party settings and hit update and save. You dont have to enter anything for the extra descriptions
  5. Edit a node of the content type with the media field added above. It will lead to a WSOD

Proposed resolution

The media widget plugin expects the field prefix to be an array. Add a special case, in widget form alter hook of the module, to deal with the media library widget plugin.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hablat created an issue. See original summary.

hablat’s picture

Issue summary: View changes