Problem/Motivation
When rebuilding my site using blt setup I encounter a fatal error at the drupal:config:import step:
Error: Call to a member function addWidget() on null in bynder_lightning_install() (line 43 of /app/docroot/modules/contrib/bynder/modules/lightning/bynder_lightning.install)
Steps to reproduce
Rebuild a site using Acquia BLT with the Lightning profile and the Bynder module installed. This appears to affect versions 2, 3 and 4 of the Bynder module.
Proposed resolution
I think checking for the existence of the entity browser $browser var first fixes this issue, so I will include a patch for this below. If there's a better solution please let me know!
Comments
Comment #2
djvern commentedComment #3
avpadernoComment #4
berdirIf this happens on a config import then this is the wrong fix, instead, it should check for \Drupal::isConfigSyncing() and if so, return early.
this shouldn't be changed.
this also either shouldn't be touched or then just all on a single line, doesn't matter if it's over > 80 characters.
Comment #5
hernani commentedAdding a patch with the suggested solution.
Comment #6
avpadernoComment #8
berdirThank you. Committed.
Lightning won't be supported anymore, so people won't use this much anymore, but makes sense as a fix.