Undefined array key "drupalmedia/drupal-media-entity"

Created on 13 June 2024, 5 months ago
Updated 22 July 2024, 4 months ago

Hi,
find this warning. dont know since when it there.
i updated from 2.9 to 3.0 and the error still there.
Any idea ? Maybe its related to a another module.
Warning : Undefined array key "drupalmedia/drupal-media-entity" inDrupal\gutenberg\Controller\BlocksController->loadByType() (/web/modules/contrib/gutenberg/src/Controller/BlocksController.php ligne 147)

πŸ’¬ Support request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada bensti

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

Merge Requests

Comments & Activities

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

  • Pipeline finished with Failed
    5 months ago
    Total: 258s
    #208865
  • πŸ‡ΈπŸ‡¦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.

  • Pipeline finished with Failed
    5 months ago
    Total: 241s
    #211869
  • πŸ‡ΈπŸ‡¦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)).

  • Pipeline finished with Failed
    5 months ago
    Total: 216s
    #211888
  • Pipeline finished with Failed
    5 months ago
    Total: 249s
    #211896
  • πŸ‡³πŸ‡΄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.

  • Pipeline finished with Success
    4 months ago
    Total: 253s
    #217306
  • Pipeline finished with Success
    4 months ago
    Total: 250s
    #217309
  • πŸ‡΅πŸ‡Ή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.

  • Pipeline finished with Success
    4 months ago
    Total: 260s
    #218152
  • Status changed to Needs review 4 months ago
  • πŸ‡©πŸ‡ͺ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.

  • Pipeline finished with Failed
    4 months ago
    Total: 1106s
    #218282
  • Pipeline finished with Skipped
    4 months ago
    #218499
  • Pipeline finished with Skipped
    4 months ago
    #218500
  • Pipeline finished with Success
    4 months ago
    Total: 326s
    #218501
    • szeidler β†’ committed 229556af on 8.x-2.x
      git commit -m 'Issue #3454471 by martins.bruvelis, szeidler, jonsimonsen...
  • Status changed to Fixed 4 months ago
  • πŸ‡©πŸ‡ͺGermany szeidler Berlin

    Seems to have been an unrelated temporary failure. Merge succeeded now.

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Canceled
    4 months ago
    Total: 68s
    #240750
  • Pipeline finished with Success
    4 months ago
    Total: 210s
    #240751
  • Pipeline finished with Success
    3 months ago
    Total: 202s
    #242614
  • Pipeline finished with Failed
    3 months ago
    Total: 2942s
    #245571
  • Pipeline finished with Success
    3 months ago
    #245902
  • Pipeline finished with Canceled
    3 months ago
    Total: 822s
    #249081
  • Pipeline finished with Success
    3 months ago
    #249096
  • Pipeline finished with Success
    3 months ago
    Total: 60801s
    #249174
  • Pipeline finished with Failed
    3 months ago
    Total: 521s
    #249877
  • Pipeline finished with Success
    3 months ago
    Total: 1236s
    #250003
  • Pipeline finished with Success
    3 months ago
    Total: 15272s
    #250007
  • Pipeline finished with Failed
    3 months ago
    Total: 275s
    #251584
  • Pipeline finished with Failed
    3 months ago
    #252348
  • Pipeline finished with Failed
    3 months ago
    Total: 330s
    #252356
  • Pipeline finished with Failed
    3 months ago
    Total: 301s
    #252597
  • Pipeline finished with Success
    3 months ago
    Total: 311s
    #252606
  • Pipeline finished with Failed
    3 months ago
    Total: 285s
    #252613
  • Pipeline finished with Success
    3 months ago
    #252639
  • Pipeline finished with Success
    3 months ago
    Total: 259s
    #252680
  • Pipeline finished with Success
    3 months ago
    Total: 262s
    #252685
  • Pipeline finished with Failed
    3 months ago
    Total: 261s
    #253397
  • Pipeline finished with Failed
    3 months ago
    #253466
  • Pipeline finished with Failed
    3 months ago
    Total: 293s
    #253469
  • Pipeline finished with Failed
    3 months ago
    Total: 420s
    #253496
  • Pipeline finished with Success
    3 months ago
    #253563
  • Pipeline finished with Success
    3 months ago
    Total: 283s
    #253644
  • Pipeline finished with Failed
    3 months ago
    Total: 621s
    #253714
  • Pipeline finished with Success
    3 months ago
    Total: 335s
    #258259
  • Pipeline finished with Success
    3 months ago
    Total: 495s
    #258276
  • Pipeline finished with Failed
    3 months ago
    #262877
  • Pipeline finished with Failed
    3 months ago
    Total: 650s
    #262892
  • Pipeline finished with Failed
    3 months ago
    Total: 555s
    #262928
  • Pipeline finished with Failed
    3 months ago
    #263001
  • Pipeline finished with Failed
    3 months ago
    Total: 463s
    #263010
  • Pipeline finished with Canceled
    3 months ago
    #263140
  • Pipeline finished with Running
    3 months ago
    #263142
  • Pipeline finished with Failed
    3 months ago
    #263141
  • Pipeline finished with Canceled
    3 months ago
    Total: 205s
    #265008
  • Pipeline finished with Failed
    3 months ago
    Total: 405s
    #265011
  • Pipeline finished with Failed
    3 months ago
    Total: 467s
    #265020
  • Pipeline finished with Failed
    3 months ago
    Total: 19501s
    #265046
  • Pipeline finished with Failed
    3 months ago
    Total: 811s
    #266040
  • Pipeline finished with Failed
    3 months ago
    Total: 482s
    #267244
  • Pipeline finished with Failed
    3 months ago
    Total: 473s
    #267288
  • Pipeline finished with Failed
    3 months ago
    Total: 539s
    #267343
  • Pipeline finished with Failed
    3 months ago
    Total: 426s
    #267477
  • Pipeline finished with Failed
    3 months ago
    Total: 435s
    #267482
  • Pipeline finished with Success
    3 months ago
    Total: 972s
    #268349
  • Pipeline finished with Success
    2 months ago
    Total: 326s
    #283687
  • Pipeline finished with Canceled
    2 months ago
    Total: 405s
    #283761
  • Pipeline finished with Success
    2 months ago
    Total: 340s
    #283766
  • Pipeline finished with Success
    about 2 months ago
    Total: 325s
    #295576
  • Pipeline finished with Success
    about 2 months ago
    Total: 326s
    #295582
  • Pipeline finished with Success
    about 1 month ago
    Total: 237s
    #305285
  • Pipeline finished with Success
    about 1 month ago
    Total: 274s
    #305296
  • Pipeline finished with Failed
    about 1 month ago
    Total: 195s
    #306149
  • Pipeline finished with Success
    about 1 month ago
    Total: 704s
    #306233
  • Pipeline finished with Success
    about 1 month ago
    Total: 190s
    #306253
  • Pipeline finished with Success
    about 1 month ago
    Total: 347s
    #307919
  • Pipeline finished with Success
    about 1 month ago
    Total: 321s
    #307920
  • Pipeline finished with Canceled
    15 days ago
    Total: 635s
    #325579
  • Pipeline finished with Success
    15 days ago
    Total: 795s
    #325583
  • Pipeline finished with Success
    13 days ago
    Total: 315s
    #327294
  • Pipeline finished with Success
    13 days ago
    Total: 223s
    #327301
  • Pipeline finished with Success
    8 days ago
    Total: 156s
    #331461
  • Pipeline finished with Skipped
    8 days ago
    #331467
Production build 0.71.5 2024