fix: move footer menus to config/install for batch install compatibility

Problem

In Drupal 11.2+, modules are installed in batches using the new batch module installation feature. The optional config core.entity_view_display.node.landing_page_lb.default.yml depends on system.menu.small-y-footer-1 and system.menu.small-y-footer-2. When these menus are in config/optional, they may not be installed in time during batch installation.

This causes the small_y profile installation to fail with the error:

Configuration core.entity_view_display.node.landing_page_lb.default depends on configuration (system.menu.small-y-footer-1, system.menu.small-y-footer-2) that will not exist after import.

Solution

  • Move system.menu.small-y-footer-1.yml from config/optional to config/install
  • Move system.menu.small-y-footer-2.yml from config/optional to config/install
  • Remove duplicate menu configs from small_y_demo_content (it depends on ws_small_y so will get menus from there)

Moving menus to config/install ensures they are created when the module is enabled, before any optional config that depends on them is processed.

Testing

  1. Create new YUSAOpenY site with dev-main branch
  2. Run: drush site:install openy openy_configure_profile.preset=small_y ...
  3. Installation should complete without the config dependency error

Merge request reports

Loading