Problem/Motivation

A fresh Varbase install (browser wizard, or any path that applies the varbase_heroslider default recipe after the module is enabled) fails on Drupal 11.4 with:

Drupal\Core\Recipe\RecipePreExistingConfigException: The configuration 'node.type.varbase_heroslider' exists already and does not match the recipe's configuration in Drupal\Core\Recipe\ConfigConfigurator->__construct() (line 69 of core/lib/Drupal/Core/Recipe/ConfigConfigurator.php).

recipes/default/recipe.yml re-imports config that the module's own config/install already ships and creates on module enable:

config:
  import:
    varbase_heroslider:
      - node.type.varbase_heroslider          # in config/install
      - entityqueue.entity_queue.varbase_heroslider   # in config/install
      - field.storage.node.field_brief        # in config/install
      - field.storage.node.field_link         # in config/install
      - field.storage.node.field_media_single # in config/install
      - field.field.node.varbase_heroslider.field_brief        # in config/optional
      - field.field.node.varbase_heroslider.field_link         # in config/optional
      - field.field.node.varbase_heroslider.field_media_single # in config/optional
      - views.view.varbase_heroslider          # in config/optional

When the module enables, config/install creates node.type.varbase_heroslider, and other installed modules (rabbit_hole, menu_ui, content_moderation/workflow) merge third-party settings onto it. The recipe then re-imports the pristine config/install copy; Drupal 11.4's recipe config comparison is strict, so the existing (now third-party-augmented) config no longer byte-matches the recipe source and the whole install aborts.

Steps to reproduce

Fresh composer create-project drupal/varbase_project:10.1.x-dev then install Varbase through the browser wizard (or any flow that enables varbase_heroslider and then applies its default recipe). The install fails at the "Assemble recipes" step with the exception above (~67%).

Proposed resolution

The recipe should not re-import the config the module's own config/install already creates on enable. Drop the config/install-sourced entries from the recipe's config.import (node.type, entityqueue, the three field storages) and keep only the config/optional entries the recipe genuinely needs to import (the three field instances + the view). Add varbase_heroslider to the recipe's install: list so the module (and its config/install) is guaranteed enabled before the optional config is imported, keeping the recipe self-sufficient when applied to a site where the module is not yet enabled.

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ➖ UX/UI designer responsibilities
  • ➖ Accessibility and Readability
  • ❌ Reviewed by a human
  • ❌ Code review by maintainers
  • ❌ Full testing and approval
  • ❌ Credit contributors
  • ❌ Review with the product owner
  • ✅ Update Release Notes
  • ✅ Release varbase-10.1.1, varbase_heroslider-1.1.1

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Fixed a fresh-install failure where the default Hero Slider recipe re-imported config the module already installs, aborting the install on Drupal 11.4's strict recipe config match.
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

rajab natshah created an issue. See original summary.

  • rajab natshah committed 0f2f6ad8 on 1.1.x
    fix: #3609140 Move all module config into the default recipe; module has...
rajab natshah’s picture

Assigned: Unassigned » josebc
Issue summary: View changes
Status: Active » Needs review
Issue tags: +varbase-10.1.1, +varbase_heroslider-1.1.1
rajab natshah’s picture

Assigned: josebc » mohammed j. razem
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
Issue summary: View changes
Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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