Problem/Motivation
On a plain drupal/cms codebase (Drupal core 11.4.6, drupal/canvas 1.11.0, no patches), installing the Varbase Starter site template exits 1 with You have requested a synthetic service ("kernel"), thrown while RecipeAppliedEvent is dispatched. The Drupal CMS browser installer path fails the same way.
Root cause: Drupal\canvas\EventSubscriber\RecipeSubscriber reaches PageVariantMigration::createFromPageRegions(), which installs the canvas_page_template_component module when a theme that has page regions has no page variant yet. Installing a module during that dispatch rebuilds the service container underneath listeners that have not run yet. Drupal CMS's drupal_cms_helper RecipeSubscriber then resolves an OOP hook class through a ClassResolver still holding the pre-rebuild container, and the install dies.
Varbase Starter always meets the trigger condition because it ships canvas.page_region.vartheme_bs5.header and canvas.page_region.vartheme_bs5.footer.
Steps to reproduce
- Build a plain
drupal/cmsproject (core 11.4.6,drupal/canvas1.11.0, no patches). - Require
drupal/varbase_starter. - Run
drush site:install recipes/varbase_starter. - The command exits 1 with
You have requested a synthetic service ("kernel").
Proposed resolution
One line in recipe.yml: add canvas_page_template_component to the recipe's own install list, with a short comment and @see pointers to the two upstream classes. The module then already exists when the event fires, so nothing is installed mid-dispatch. Same fix as horizonaid#3622092.
Verified locally (plain drupal/cms, core 11.4.6, canvas 1.11.0, no patches):
drush site:install recipes/varbase_starterexits 0, 0 warnings, 0 errors.- The Drupal CMS installer path also exits 0:
drush site:install drupal_cms_installer installer_site_template_form.add_ons=varbase_starter. - Site serves:
/,/features,/blog,/about-varbase,/contact-us,/user/loginand/search?keywords=varbaseall HTTP 200. - Content present: 14 nodes, 5 Canvas pages, 59 media items, default theme
vartheme_bs5. - No PHP errors in watchdog.
Note for reviewers: the underlying defect is upstream in drupal/canvas — a module installed during RecipeAppliedEvent strands earlier-resolved listeners on a stale container. This change only stops Varbase Starter triggering it. Related upstream report: drupal_cms work item 3591450.
Remaining tasks
- ✅ File an issue
- ✅ Addition/Change/Update/Fix
- ✅ Testing to ensure no regression
- ➖ Automated unit testing coverage
- ➖ Automated functional testing coverage
- ➖ UX/UI designer responsibilities
- ➖ Readability
- ➖ Accessibility
- ➖ Performance
- ➖ Security
- ➖ Developer Documentation
- ➖ User Guide Documentation
- ❌ Reviewed by human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ➖ Review with the product owner
- ❌ Release notes snippet
- ✅ Release varbase_starter-1.0.2
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Varbase Starter now installs
canvas_page_template_componentitself, so installing the site template on a plain Drupal CMS codebase no longer fails withYou have requested a synthetic service ("kernel").
Issue fork varbase_starter-3622105
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 natshah