If a Lightning component (e.g. Workflow) is excluded by a sub-profile, the resulting config export is different than if Workflow (and it's dependencies) are manually uninstalled. Steps to reproduce:

Manually uninstall Workflow (works as designed)

  1. Install Lightning
  2. Uninstall lightning_workflow, lightning_scheduled_updates, workbench_moderation, and scheduled_updates
  3. Export config
  4. Note the dependencies listed in the config for node.type.page:
dependencies:

  module:

    - menu_ui

Exclude Lightning Workflow (exports config with bad dependencies)

  1. Create a sub-profile that excluded Lightning Workflow (using the Drupal Console generator, this will add lightning_workflow and lightning_scheduled_updates to the excluded_dependencies array.
  2. Install the sub-profile - note that Lightning Workflow, Workbench Moderation, Scheduled Publication, and Scheduled Updates are all uninstalled as they should be.
  3. Export config
  4. Note the dependencies listed in the config for node.type.page:
dependencies:

  module:

    - lightning_scheduled_updates
    - menu_ui
    - workbench_moderation

Basic Page should not have lightning_scheduled_updates or workbench_moderation listed.

It's then impossible to install a new site using config because the node.type.page config has unmet dependencies because core.extensions.yml doesn't have WBM or Scheduled Updates listed in it.

I think node.type.page is possibly getting those bad dependencies from the config Lightning provides in lightning_core/modules/lightning_page/config/install/node.type.page which lists those dependencies under its third_part_config settings.

Comments

balsama created an issue. See original summary.

phenaproxima’s picture

Status: Active » Needs review

I believe this is now fixed; I will test manually to confirm.

The reason I say that is because, in the 8.x-2.x branch of Lightning Core, the lightning_page module implements hook_modules_installed() such that moderation for the page node type is only enabled if and when Content Moderation is installed. (The same thing was done to the lightning_landing_page component of Lightning Layout.) So I believe this will correct the problem, since the third-party dependencies are no longer hard-coded.

phenaproxima’s picture

Status: Needs review » Fixed
  1. Created a sub-profile with lightning_workflow as an excluded dependency.
  2. Installed cleanly from the sub-profile and confirmed that lightning_workflow was not installed. (drush cget core.extension module | grep workflow)
  3. Exported config and confirmed that only menu_ui was listed as a dependency of the page node type.

I think we can call this one fixed.

Status: Fixed » Closed (fixed)

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