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;
}

CommentFileSizeAuthor
#5 druxt missing resources.png49.34 KBdeciphered

Issue fork druxt-3249293

Command icon 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

Marcin Maruszewski created an issue. See original summary.

deciphered’s picture

Issue summary: View changes
deciphered’s picture

Hi @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.

marcin maruszewski’s picture

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

deciphered’s picture

Version: 1.1.1 » 1.1.x-dev
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new49.34 KB

I've added the suggested fix, along with a second warning on the Status report page when a resource is missing (opposed to disabled):

realityloop’s picture

Version: 1.1.x-dev » 1.2.x-dev

realityloop’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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