Problem/Motivation
The Varbase installer only ever applies the profile's default recipe (drupal/varbase_starter). There is no way to choose a site template in the browser installer, so the new Educare site template (drupal/educare) cannot be selected at install time.
Simply adding RecipeKit's own form to the profile does not work:
forms:
- '\Drupal\RecipeKit\Installer\Form\SiteTemplateForm'
That form builds its list by calling Recipe::createFromDirectory() on every type: Site recipe, which runs core's ConfigConfigurator pre-flight against the ACTIVE configuration. In the early installer the active configuration is the on-disk InstallStorage, so any Varbase sub-recipe that ships a config object which a module also provides makes the pre-flight throw and the installer dies before the user can choose anything:
Drupal\Core\Recipe\RecipePreExistingConfigException: The configuration 'core.entity_view_mode.media.full' 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).
(varbase_media_base ships core.entity_view_mode.media.full, which the core media module also provides; more conflicts follow, e.g. metatag.metatag_defaults.front.)
Drupal CMS avoids this because its installer profile carries no modules/themes and its recipes declare narrow config.strict lists. Loosening config.strict across the varbase_* recipes was tried and REJECTED: it made the picker render but broke installation (the site template's theme was not installed and the site ended up on stark with a 500).
Steps to reproduce
- Install Varbase 11.0.x-dev on a fresh site.
- Add RecipeKit's \Drupal\RecipeKit\Installer\Form\SiteTemplateForm to varbase.info.yml's forms list.
- Run the installer and reach the "Choose a site template" step.
- The installer dies with a RecipePreExistingConfigException before a template can be chosen.
Proposed resolution
Add a Varbase-owned installer form, Drupal\varbase\Installer\Form\SiteTemplateForm (profile-only, no changes to any varbase_* recipe), which lists the available site templates by parsing each recipe.yml (name, description, screenshot, extra) instead of constructing the Recipe. Listing a template needs only its metadata, so the config pre-flight never runs. The chosen recipe is still applied normally by RecipeKit's applyRecipes(). It extends RecipeKit's RecipeSelectionFormBase, renders radios with the site-template theme wrapper, and honours the recipe's extra.recipe_installer_kit.finish_url.
Tested (Drupal 11.4, Varbase 11.0.x, DDEV, real browser):
- The installer now shows "Choose a site template" listing Varbase Starter and Educare, with screenshots and descriptions, and no errors.
- Round 1, selecting Varbase Starter: install completes; default theme vartheme_bs5; 5 canvas pages, 14 nodes; front page HTTP 200.
- Round 2, selecting Educare: install completes; default theme vartheme_bs5_educare; 13 canvas pages, 14 nodes, 76 media; front page HTTP 200.
- Both from a dropped database (fresh install each time).
- Side effect: the recipe-validation warnings that RecipeKit's form surfaced (varbase_ai_editor_assistant, varbase_ai_taxonomy_tagging) no longer appear, since recipes are no longer constructed just to be listed.
AI-Generated: Yes (Used Claude Code to draft the SiteTemplateForm class, the varbase.info.yml change, and this issue write-up; reviewed by rajab-natshah before filing.)
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
User interface changes
- The installer gains a new "Choose a site template" step (radios with screenshot and description per template) before the recipes/site-name steps.
The installer showing the new "Choose a site template" step, with Varbase Starter and Educare, in a working Varbase 11 install:

API changes
- New class Drupal\varbase\Installer\Form\SiteTemplateForm, added to the varbase.info.yml forms list ahead of RecipeKit's RecipesForm and SiteNameForm.
Data model changes
- N/A
Release notes snippet
- N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | installer-template-picker.png | 148.77 KB | rajab natshah |
Issue fork varbase-3610649
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
Comment #4
rajab natshahComment #5
rajab natshah