This causes problems when trying to use the Config Installer profile to install a site that uses Lightning. Steps to reproduce:

1. Install a new site with the Lightning profile
2. Export config
3. Add the Config Installer profile to your codebase
4. Run `drush site-install config_installer`

Expected result:
The config installer profile would install Lightning and all of it's config

Actual result:
[error] The configuration cannot be imported because it failed validation for the following reasons:

  • Configuration user.role.layout_manager depends on the lightning module that will not be installed after import.

And here is the contents of user.role.layout_manager.yml:

langcode: en
status: true
dependencies:
  module:
    - lightning
third_party_settings:
  lightning:
    bundled: true
_core: {  }
id: layout_manager
label: 'Layout manager'
weight: 2
is_admin: false
permissions:
  - 'administer node display'
  - 'administer panelizer'
  - 'administer panelizer node landing_page defaults'
  - 'administer panelizer node page defaults'

Proposed resolution

I don't think the layout manager role actually needs the Lightning profile installed. If it does, that should be fixed.

CommentFileSizeAuthor
#8 2933445.patch1.09 KBbalsama
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

balsama created an issue. See original summary.

balsama’s picture

Status: Active » Postponed

Removing the following from lightning_layout/config/optional/user.role.layout_manager.yml seems to fix the problem:

third_party_settings:
  lightning:
    bundled: true

But I have no way of testing that change fully because we only run CI tests against Lightning itself. See #2933252: Support individual components outside of profile. (And I don't know what that setting was supposed to do)

While we could test this individually, I'd rather postpone this on #2933252: Support individual components outside of profile. It makes a good test case.

Also, for the record, now that #2925010: Split Lightning Components into individual modules outside of the Profile is fixed, I'd like to document and start recommending Config Installer profile - which is why I was testing this.

phenaproxima’s picture

Status: Postponed » Needs work

I'm about 96% sure that those bits can be removed from the config without harming anything. I don't think the 'bundled' key was anything we really ended up using; I believe that the config structure of Lightning Roles came to replace it. So if tests pass with that stuff removed, then full steam ahead, I say.

balsama’s picture

Status: Needs work » Postponed
Related issues: +#2933252: Support individual components outside of profile
balsama’s picture

Status: Postponed » Needs review

Lightning Layout has CI + Tests now so this is unblocked.

Fix from #2 is running now.

balsama’s picture

Status: Needs review » Needs work

We need an update hook to remove that dependency on existing sites too.

balsama’s picture

balsama’s picture

FileSize
1.09 KB

Attaching a patch for those that want to use the config installer profile before our next release. This should be applied to the lightning_layout module. E.g:

    "patches": {
            "drupal/lightning_layout": {
                "2933445 - user.role.layout_manager has dependency on Lightning":
                "https://www.drupal.org/files/issues/2933445.patch"
            }
        },

Status: Fixed » Closed (fixed)

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