Problem/Motivation

When an install profile lists this module to be installed, the following Exception occurs:

Drupal\Core\Config\UnmetDependenciesException: Configuration objects     [error]
provided by <em class="placeholder">role_watchdog</em> have unmet
dependencies: <em
class="placeholder">views.view.role_watchdog_history
(user.role.administrator)</em> in
/var/www/html/web/core/lib/Drupal/Core/Config/UnmetDependenciesException.php:100

The issue is that the module contains a views configuration in config/install/, while the views configuration should be residing in `config/optional` as at the time of the profile install, views might or might not be installed.

Steps to reproduce

You may reproduce it with the following steps:

  1. Create a basic install profile *.info.yml, listing the following:
    dependencies:
      - role_watchdog
    
  2. Install the profile.

These steps should produce the error noted above.

Proposed resolution

Move all views configuration from `config/install/` to `config/optional/` folder.

  1. Additional information on the `views` dependencies while installing a profile is here.
  2. Another interesting post regarding the profile installation and dependencies is linked here.
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

VangelisP created an issue. See original summary.

vangelisp’s picture

Issue summary: View changes
gaurav.kapoor’s picture

+1 to this. @VangelisP are you working on patch or MR for this?

vangelisp’s picture

Issue summary: View changes

vangelisp’s picture

@gaurav.kapoor I've created an MR. I believe I did it right (fingers crossed)

gaurav.kapoor’s picture

Status: Active » Fixed

Thanks for working on this @VangelisP

vangelisp’s picture

Thank you for the prompt response gaurav.kapoor !!

Status: Fixed » Closed (fixed)

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