Drupal 9.0.1
Gutenberg 8.x-1.11
Media & Media Library : actived

When you add image form gutenberg editor you got a erreur

Cannot read property 'raw' of undefined

when we deactivate Media Library, the message disappears

ddd

Comments

ytokan created an issue. See original summary.

thi3rry’s picture

I have the same issue and found an error in reports :

ArgumentCountError: Too few arguments to function Drupal\media_library\MediaLibraryUiBuilder::__construct(), 4 passed in /Users/thierrypoinot/Sites/drupal/core/lib/Drupal/Component/DependencyInjection/Container.php on line 257 and exactly 5 expected in Drupal\media_library\MediaLibraryUiBuilder->__construct() (line 76 of core/modules/media_library/src/MediaLibraryUiBuilder.php)

With Drupal 9, MediaLibraryUiBuilder adds an arguments in constructor "@media_library.opener_resolver"
To solve the error Add a 5th arguments in the gutenberg.services.yml for the gutenberg.media_library.ui_builder services :

File : gutenberg.services.yml

  gutenberg.media_library.ui_builder:
    class: Drupal\gutenberg\GutenbergMediaLibraryUiBuilder
    arguments: ['@entity_type.manager', '@request_stack', '@views.executable', '@form_builder', '@media_library.opener_resolver']

This issue seems a duplicate with : https://www.drupal.org/project/gutenberg/issues/3150127

thi3rry’s picture

bellenss’s picture

I have the same issue on Drupal 9.0.3 with Media Library activated. Confirming the modification in #2 fixes the issue.

vince_pl’s picture

I checked and on Gutenberg 2.x-dev on Drupal 9.0.5, problem also exist.

The same issue is described in more detail here https://www.drupal.org/project/gutenberg/issues/3150127

johan den hollander’s picture

Status: Active » Closed (duplicate)
Haessler’s picture

Issue tags: +Drupal 9, +Gutenberg

On uploading images in an Gutenberg Block still responded with undefined is not an object (evaluating 'L.title.raw')
Deactivating Media Library is not an option.

Using Drupal 9.1.3 (en), Gutenberg Version: 8.x-1.11

Haessler’s picture

Title: Drupal 9 & gutenberg 8.x-1.11 » Drupal 9.1.8 & gutenberg 8.x-2.0-beta2
Version: 8.x-1.11 » 8.x-2.0-beta2
Status: Closed (duplicate) » Active

Still the same bug. Does anybody care?

szeidler’s picture

Status: Active » Closed (duplicate)

Have you tested the patch in #3150127: Insert Image or Media shows blank modal Media Library window? According to the comments above this should fix the issue. We're working on doing a proper stable release in May that includes a lot of Bugfixes that have been added to the dev version.