InvalidArgumentException when creating a content with Media Embed in CKeditor

Created on 31 March 2020, over 4 years ago
Updated 9 June 2023, over 1 year ago

If we install the media library, then configure a content format with Ckeditor and the Media Embed Button and we go to edit or create any node that can use that Content Format I get a WSOD with this error:

InvalidArgumentException: The allowed types parameter is required and must be an array of strings. en Drupal\media_library\MediaLibraryState->validateRequiredParameters() (linea 146 de C:\wamp64\www\ayudea\core\modules\media_library\src\MediaLibraryState.php).

I can fix it creating a new media type in: admin/structure/media/add

But the error should be more user friendly that sending me a WSOD.

I think this is related to: https://www.drupal.org/project/drupal/issues/3033653 β†’ and this one: https://www.drupal.org/project/drupal/issues/3033652 πŸ› Be more helpful if there's no bundle to choose from Needs work

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 7 hours ago

Created by

πŸ‡΅πŸ‡ͺPeru jeeba

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • 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.

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

    Yup. Just came across this myself when starting a brand new project for the purposes of working on contributing to some modules for the CKEditor 5 upgrade. I needed a totally empty, fresh Drupal site for this work and got this error. Good to know the workaround.

  • πŸ‡©πŸ‡ͺGermany gnuschichten

    I always start with the minimal profile. After I added the Ckeditor button for drupal media, I also got the WSOD.
    However, since only experienced people generally use the minimal profile, it can actually be assumed that they will check the logs when a WSOD appears in the frontend.

    I think "minor priority" should be enough

  • Same here. Fresh install. Created first CT. Got error on new CT node creation. Created first MT. No longer receive error.

  • πŸ‡­πŸ‡ΊHungary djg_tram

    That's still a critical bug. You have everly right to turn on a module and not starting to use it immediately. A WSOD is hardly acceptable...

Production build 0.71.5 2024