After exporting a package, went to Extends page to enable the module. Got this error:
Call to a member function getBundle() on a non-object in /var/www/docroot/modules/contrib/features/src/FeaturesManager.php on line 878
After exporting a package, went to Extends page to enable the module. Got this error:
Call to a member function getBundle() on a non-object in /var/www/docroot/modules/contrib/features/src/FeaturesManager.php on line 878
Comments
Comment #3
mpotter commentedI fixed this in commit 43b881c, but not actually sure the method is correct.
It seems that in #2596047: Duplicate packages generated there were a lot of changes around short and full names that require getting the current Bundle. When a module is installed and the FeaturesConfigInstaller::findPreExistingConfiguration() function tries to listExistingConfig() it was trying to get the bundle from "$this->assigner" which wasn't set yet.
So I added a condition to getAssigner() to use the standard service if none is defined. Then changed all references of "$this->assigner" to "$this->getAssigner()".
Not really sure how to properly handle the dependency injection here. I think the FeaturesManager and FeaturesAssigner aren't quite modular enough because they both depend on each other. This kind of circular reference is probably bad.