RuntimeException: entity_reference_media.opener.field_widget must be an instance of Drupal\media_library\MediaLibraryOpenerInterface

Created on 27 June 2024, 5 months ago

Problem/Motivation

Trying to attach a media item using the Media Enhanced field type no longer works in 10.3.x. Instead it throws a RuntimeException: entity_reference_media.opener.field_widget must be an instance of Drupal\media_library\MediaLibraryOpenerInterface error. The 10.3.0 update includes a change record ( https://www.drupal.org/node/3457521 ) that now requires adding a tag to the service.

Steps to reproduce

  1. Upgrade use Drupal 10.3.0
  2. try to attach a media item use the Media Library widget and Media Enhanced as the field type

Proposed resolution

Add the name: media_library.opener tag to the service

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

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