Problem/Motivation
In the druxt_requirements function there is the$required_resources array. It has a refference to the block--block entity. When the druxt module is installed and the block module is uninstalled on the website there is an error:
Error: Call to a member function isInternal() on null in /var/www/html/web/modules/contrib/druxt/druxt.install on line 44
Problem/Motivation
In the druxt_requirements function there is the$required_resources array. It has a refference to the block--block entity. When the druxt module is installed and the block module is uninstalled on the website, there is an error:
Error: Call to a member function isInternal() on null in /var/www/html/web/modules/contrib/druxt/druxt.install on line 44
Steps to reproduce
1. Create Drupal website (for example using minimal installation profile).
2. Uninstall the block module.
3. Try to install druxt module.
Proposed resolution
Before checking does the resource is interlan using isInternal() method we should check does it exists. We can add following statement to do it:
if (!$resource_type) {
continue;
}

| Comment | File | Size | Author |
|---|---|---|---|
| #5 | druxt missing resources.png | 49.34 KB | deciphered |
Issue fork druxt-3249293
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
decipheredComment #3
decipheredHi @Marcin Maruszewski,
It's worth nothing that when reproducing this issue by the UI, the issue only appears to occur when you visit the Status report page.
Issue is valid though, and needs to be fixed. Thanks for the bug report.
Comment #4
marcin maruszewski commentedThanks for the update. I noticed I forgot to mention that issue occurs when I was trying to enable the module using
drush. I haven't checked the UI.Comment #5
decipheredI've added the suggested fix, along with a second warning on the Status report page when a resource is missing (opposed to disabled):
Comment #7
realityloop commentedComment #9
realityloop commented