I receive the following error when attempting to install 8.x-1.0-beta3.
PHP Fatal error: Call to a member function getConfigDependencyKey() on null in /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/entity_browser/src/Plugin/EntityBrowser/Widget/View.php on line 277
PHP Stack trace:
PHP 1. {main}() /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/drush.php:0
PHP 2. drush_main() /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/drush.php:12
PHP 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/preflight.inc:66
PHP 4. drush_dispatch($command = *uninitialized*, $arguments = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:67
PHP 5. call_user_func_array:{/Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:199}(*uninitialized*, *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:199
PHP 6. drush_command(*uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:199
PHP 7. _drush_invoke_hooks($command = *uninitialized*, $args = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:231
PHP 8. call_user_func_array:{/Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:422}(*uninitialized*, *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:422
PHP 9. drush_pm_enable(*uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:422
PHP 10. drush_module_enable($modules = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/commands/pm/pm.drush.inc:1167
PHP 11. drush_module_install($module_list = *uninitialized*, $enable_dependencies = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/commands/core/drupal/environment.inc:198
PHP 12. Drupal\Core\ProxyClass\Extension\ModuleInstaller->install($module_list = *uninitialized*, $enable_dependencies = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/commands/core/drupal/environment.inc:131
PHP 13. Drupal\Core\Extension\ModuleInstaller->install($module_list = *uninitialized*, $enable_dependencies = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
PHP 14. Drupal\Core\Config\ConfigInstaller->installDefaultConfig($type = *uninitialized*, $name = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php:248
PHP 15. Drupal\features\FeaturesConfigInstaller->createConfiguration($collection = *uninitialized*, $config_to_create = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/ConfigInstaller.php:125
PHP 16. Drupal\Core\Config\ConfigInstaller->createConfiguration($collection = *uninitialized*, $config_to_create = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/features/src/FeaturesConfigInstaller.php:106
PHP 17. Drupal\entity_browser\Entity\EntityBrowser->save() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/ConfigInstaller.php:321
PHP 18. Drupal\Core\Config\Entity\ConfigEntityBase->save() /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/entity_browser/src/Entity/EntityBrowser.php:439
PHP 19. Drupal\Core\Entity\Entity->save() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:637
PHP 20. Drupal\Core\Config\Entity\ConfigEntityStorage->save($entity = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Entity/Entity.php:364
PHP 21. Drupal\Core\Entity\EntityStorageBase->save($entity = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:259
PHP 22. Drupal\Core\Entity\EntityStorageBase->doPreSave($entity = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php:389
PHP 23. Drupal\entity_browser\Entity\EntityBrowser->preSave($storage = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php:434
PHP 24. Drupal\Core\Config\Entity\ConfigEntityBase->preSave($storage = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/entity_browser/src/Entity/EntityBrowser.php:400
PHP 25. Drupal\Core\Config\Entity\ConfigEntityBase->calculateDependencies() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:346
PHP 26. Drupal\Core\Config\Entity\ConfigEntityBase->calculatePluginDependencies($instance = *uninitialized*) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:388
PHP 27. Drupal\entity_browser\Plugin\EntityBrowser\Widget\View->calculateDependencies() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:35
Fatal error: Call to a member function getConfigDependencyKey() on null in /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/entity_browser/src/Plugin/EntityBrowser/Widget/View.php on line 277
Call Stack:
0.0047 228304 1. {main}() /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/drush.php:0
0.0245 403008 2. drush_main() /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/drush.php:12
0.7096 13200728 3. Drush\Boot\BaseBoot->bootstrap_and_dispatch() /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/preflight.inc:66
4.2397 41413464 4. drush_dispatch(???, ???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php:67
4.8872 45606296 5. call_user_func_array:{/Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:199}(???, ???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:199
4.8872 45606816 6. drush_command(???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:199
4.8879 45612048 7. _drush_invoke_hooks(???, ???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:231
5.4717 47813984 8. call_user_func_array:{/Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:422}(???, ???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:422
5.4717 47814600 9. drush_pm_enable(???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/includes/command.inc:422
7.3573 47834888 10. drush_module_enable(???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/commands/pm/pm.drush.inc:1167
7.3573 47834936 11. drush_module_install(???, ???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/commands/core/drupal/environment.inc:198
7.3575 47836240 12. Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(???, ???) /Users/les.peabody/Sites/innovation_room_d8/vendor/drush/drush/commands/core/drupal/environment.inc:131
7.3629 48230784 13. Drupal\Core\Extension\ModuleInstaller->install(???, ???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php:83
10.4280 68056832 14. Drupal\Core\Config\ConfigInstaller->installDefaultConfig(???, ???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php:248
10.4289 68060224 15. Drupal\features\FeaturesConfigInstaller->createConfiguration(???, ???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/ConfigInstaller.php:125
10.4289 68060864 16. Drupal\Core\Config\ConfigInstaller->createConfiguration(???, ???) /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/features/src/FeaturesConfigInstaller.php:106
10.4767 68690416 17. Drupal\entity_browser\Entity\EntityBrowser->save() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/ConfigInstaller.php:321
10.4767 68690472 18. Drupal\Core\Config\Entity\ConfigEntityBase->save() /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/entity_browser/src/Entity/EntityBrowser.php:439
10.4767 68690472 19. Drupal\Core\Entity\Entity->save() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:637
10.4768 68690680 20. Drupal\Core\Config\Entity\ConfigEntityStorage->save(???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Entity/Entity.php:364
10.4768 68690712 21. Drupal\Core\Entity\EntityStorageBase->save(???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php:259
10.4768 68691000 22. Drupal\Core\Entity\EntityStorageBase->doPreSave(???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php:389
10.4788 68691256 23. Drupal\entity_browser\Entity\EntityBrowser->preSave(???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Entity/EntityStorageBase.php:434
10.4788 68691656 24. Drupal\Core\Config\Entity\ConfigEntityBase->preSave(???) /Users/les.peabody/Sites/innovation_room_d8/docroot/modules/contrib/entity_browser/src/Entity/EntityBrowser.php:400
10.5343 69430472 25. Drupal\Core\Config\Entity\ConfigEntityBase->calculateDependencies() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:346
10.5344 69432128 26. Drupal\Core\Config\Entity\ConfigEntityBase->calculatePluginDependencies(???) /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:388
10.5345 69432928 27. Drupal\entity_browser\Plugin\EntityBrowser\Widget\View->calculateDependencies() /Users/les.peabody/Sites/innovation_room_d8/docroot/core/lib/Drupal/Core/Plugin/PluginDependencyTrait.php:35
What's happening is the install of entity_browser.browser.media_entity_browser.yml happens before views.view.media_entity_browser.yml, but that browser expects the media_entity_browser view to already exist, so when the widget view plugin tries to load the view, it doesn't exist yet, resulting in the fatal error you see above.
I solved this by manually adding views.view.media_entity_browser as a config dependency in entity_browser.browser.media_entity_browser.yml. After making that change, the installation succeeds without error.
This raises a bigger question though, in how the dependencies get calculated and exported into installation config? If this is automated then there is a deficiency in that process. If no such automation process exists, and this was manually done, then I guess this is just a simple fix with no further thought required. I'm a config newbie still so the correct method for exporting install config for a module is unknown to me.
Comment | File | Size | Author |
---|---|---|---|
#3 | fix-null-dependency-during-install-media_entity_browser-2867850-3.patch | 503 bytes | lpeabody |
Comments
Comment #2
lpeabody CreditAttribution: lpeabody commentedSetting to critical since the module can't be installed it seems.
Comment #3
lpeabody CreditAttribution: lpeabody commentedComment #4
lpeabody CreditAttribution: lpeabody commentedComment #6
StevenWill CreditAttribution: StevenWill at Zilleem commentedI had the same issue on install and the #3 patch worked.
Comment #7
KarlSheaThis is exactly the same issue fixed in #2850574: The browser entity should list the associated view as a config dependency.
Comment #8
dstorozhukAfter adding the dependency in to the config - installation works fine.
Comment #9
dstorozhukThis must be committed ASAP
Comment #10
tassilogroeper CreditAttribution: tassilogroeper at WONDROUS commented+1 on the patch #3
Comment #11
GrimreaperHello,
It seems that an identical path has already been commited.
But on git log: http://cgit.drupalcode.org/media_entity_browser/log/?h=8.x-1.x we can see that it is not in the 8.x-1.0-beta3 version because of some commits merged without the command "git pull --rebase" executed before.
Maintainers need to create a new release.
Comment #12
blacklabel_tom CreditAttribution: blacklabel_tom commentedTested this afternoon and can confirm the patch in: https://www.drupal.org/node/2850574 has fixed this issue.
Cheers
Tom
Comment #13
rikki_iki CreditAttribution: rikki_iki at PreviousNext commentedSounds like this is a duplicate of https://www.drupal.org/node/2850574 which has been fixed. So closing this issue.
Comment #14
alfaguru CreditAttribution: alfaguru commentedThis issue still exists on the 2.x branch.I tried the patch at #3 and after deleting the image_style.media_entity_browser_thumbnail config was able to install cleanly.
Ignore this comment. I had the wrong version installed because composer isn't smart enough to get the right one unless you tell it to.