Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298556

Call to a member function getConfigDependencyKey() on null in core/modules/user/src/Plugin/views/filter/Roles.php

$
0
0

To replicate,

* create users view
* add roles filter (exposed) with "Select all" selected in Options field.
* Export view to module/profile and reinstall website.

The following error would occur
Error: Call to a member function getConfigDependencyKey() on null in Drupal\user\Plugin\views\filter\Roles->calculateDependencies() (line 93 of /docroot/core/modules/user/src/Plugin/views/filter/Roles.php).

While debugging the role_id with the value all is used in Drupal\user\Plugin\views\filter\Roles::calculateDependencies() in the following code

    foreach ((array) $this->value as $role_id) {
      $role = $this->roleStorage->load($role_id);
      $dependencies[$role->getConfigDependencyKey()][] = $role->getConfigDependencyName();
    }

Viewing all articles
Browse latest Browse all 298556


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>