- Issue created by @bensti
- π³π΄Norway jonsimonsen
I'm seeing the same message when adding new content that use GB. We had a custom module with some GB blocks, but the message still appeared when that module was disabled.
My project is set up with Gin as admin theme. I'm not sure if that should have anything to say, but I noticed that gin_gutenberg is currently not installed. I'll just test if that makes any difference
- π³π΄Norway jonsimonsen
So from what I can see, the log message appears immediately when going to add new content that is set up with GB. I've still not seen anything that is obviously broken in the editor. The issue seems to have appeared after upgrading to D10. I don't see similar messages on the D9 version of the site.
- π©πͺGermany szeidler Berlin
Could you check, that the "Media" Gutenberg block is enabled in the content type's Gutenberg configuration?
If that is not the case, then it seems that the 2.x => 3.x update was not running properly or there was an issue in your config-workflow, so that it might have gotten reverted.
- π³π΄Norway jonsimonsen
There is no "Media" in the GB blocks. Note that I did not upgrade to 3.x yet (the original post implied that there are issue on both 2.x and 3.x). I can try the upgrade and see how it looks afterwards
- π¨πSwitzerland colorfield Lausanne
Started to see the same in the logs after bumping from 2.8.0 to 2.9.0.
CI was fine (drush updb/drush cex committed), seeing drupalmedia/drupal-media-entity in the config export so seems to be related to π Media block is allowed even if not indicated as allowed Fixed - πΈπ¦Saudi Arabia martins.bruvelis Thuwal
martins.bruvelis β made their first commit to this issueβs fork.
- Merge request !162If block definition in `loadByType` is empty, return empty array. β (Merged) created by martins.bruvelis
- πΈπ¦Saudi Arabia martins.bruvelis Thuwal
Checked that the warning is displayed when enabling block "drupalmedia/drupal-media-entity". However, there are no settings for "drupalmedia/drupal-media-entity" in `$definitions`. Therefore if the block definition in `loadByType` is empty, created a patch to return an empty array for the "drupalmedia/drupal-media-entity" and other blocks with empty block definitions.
- π©πͺGermany szeidler Berlin
The MR is fixing the issue for me. In my case this issue makes the whole Gutenberg stuck loading if the Media block is enabled and you're working in an environment that prints out warnings.
- πΈπ¦Saudi Arabia martins.bruvelis Thuwal
If block definition in `loadByType` is empty, return `null`. The empty array cannot be used as \Drupal\gutenberg\GutenbergLibraryManager -> getActiveThemeDefinitions return results if activeThemeDefinitions value is declared and is not NULL (via is set ($this->activeThemeDefinitions)).
- π³π΄Norway jonsimonsen
So I'm not so used to working with issue forks. Is it possible to create one here for GB 2.9, or will that require an entirely new issue to be created?
I did not see a button for creating a new issue fork here at least
- π³π΄Norway jonsimonsen
I added a patch for Gutenberg 2.9 based on the current merge request
Tested it on a project where Gutenberg wasn't loading and the Javascript tab in developer tools showed this message
<br/><b>Warning</b>: Undefined array key "drupalmedia/drupal-media-entity " in <b>/var/www/html/web/modules/contrib/gutenberg/src/Controller/BlocksController.php</b> on line <b>119</b><br />
I did not observe any issues afterwards. I do see that GB 3.0 is structured somewhat differently so one of the files in the MR is not present in GB 2.9.
- π΅πΉPortugal marcofernandes
Merged to 3.0.x. I'll keep this issue open if someone wants to do a MR for 8.x-2.x.
- Merge request !167Issue #3454471 by martins.bruvelis, jonsimonsen, szeidler, bensti, colorfield:... β (Merged) created by szeidler
- Status changed to Needs review
4 months ago 4:43pm 7 July 2024 - π©πͺGermany szeidler Berlin
Opened a MR based on the patch from @jonsimonsen. Quite straightforward, since we only needed the second part of @martins.bruvelis MR, since the LayoutProcessor is not part of 8.x-2.x.
-
szeidler β
committed 229556af on 8.x-2.x
git commit -m 'Issue #3454471 by martins.bruvelis, szeidler, jonsimonsen...
-
szeidler β
committed 229556af on 8.x-2.x
- Status changed to Fixed
4 months ago 5:09am 8 July 2024 - π©πͺGermany szeidler Berlin
Seems to have been an unrelated temporary failure. Merge succeeded now.
Automatically closed - issue fixed for 2 weeks with no activity.