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.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2933445.patch | 1.09 KB | balsama |
Comments
Comment #2
balsamaRemoving the following from
lightning_layout/config/optional/user.role.layout_manager.yml
seems to fix the problem: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.
Comment #3
phenaproximaI'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.
Comment #4
balsamaThis is still blocked on #2933252: Support individual components outside of profile.
Comment #5
balsamaLightning Layout has CI + Tests now so this is unblocked.
Fix from #2 is running now.
Comment #6
balsamaWe need an update hook to remove that dependency on existing sites too.
Comment #7
balsamaFixed! http://cgit.drupalcode.org/lightning_layout/commit/?id=7b085af
Comment #8
balsamaAttaching 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: