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

Created on 25 June 2024, 3 days ago
Updated 28 June 2024, about 3 hours ago

Problem/Motivation

As noted in https://www.drupal.org/project/drupal/issues/3446026 πŸ› Adding media library openers use autoconfigure and tags in 10.3.x has BC consequences Active , a change was made in 10.3.x where adding media library openers to use autoconfigure and tags in 10.3.x has BC consequences. I believe this is affecting this module when using on 10.3.0.

Steps to reproduce

* Install drupal 10.3.0
* Enable bootstrap_styles which uses this module
* Try to add a media element to a section bacground
* See error: RuntimeException: media_library.opener.form_element must be an instance of Drupal\media_library\MediaLibraryOpenerInterface

πŸ› Bug report
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States johnlutz

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

Merge Requests

Comments & Activities

  • Issue created by @johnlutz
  • Status changed to Needs review 2 days ago
  • πŸ‡ΊπŸ‡ΈUnited States johnlutz
  • Pipeline finished with Failed
    2 days ago
    Total: 155s
    #208688
  • Assigned to mark_fullmer
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Thanks for the bug report and the proposed change! Assigning myself for review...

  • πŸ‡¨πŸ‡¦Canada bwaindwain

    I've tested mr12 and works great. Thanks @johnlutz! +RTBC

  • Pipeline finished with Skipped
    1 day ago
    #209913
  • Status changed to Fixed 1 day ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Agreed. This looks good! Merging to the 2.x branch.

  • Status changed to Active 1 day ago
  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Re-opening, since as implied by the original description, this has backwards compatibility consequences: previous versions of media_library_form_element will not work with Drupal core 10.3 or above.

    Given this, we should probably change the core_version_requirement to >=10.3 in the 2.x branch and cut a new release sooner rather than later, so that this doesn't prevent sites from updating to Drupal 10.3

    I am a maintainer, but do not have permission to create new releases, so another of the maintainers will need to be involved.

    Increasing the priority to "Major."

  • πŸ‡ΊπŸ‡ΈUnited States mark_fullmer Tucson

    Clarification: based on testing, the change introduced here does not introduce BC problems with prior versions of Drupal core. Rather, this change is required for compatibility with Drupal 10.3 and above.

    Therefore, I think we just need to cut a new release -- no change to the core_version_requirement.

  • πŸ‡ΊπŸ‡ΈUnited States millerrs

    Thanks @johnlutz and @mark_fullmer! I encountered this issue after upgrading to 10.3.0, and MR12 worked. A new release would be great to avoid needing a patch or using the dev version.

    @nightlife2008, can you help with releasing version 2.1.0?

Production build 0.69.0 2024