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

  1. Build a plain drupal/cms project (core 11.4.6, drupal/canvas 1.11.0, no patches).
  2. Require drupal/varbase_starter.
  3. Run drush site:install recipes/varbase_starter.
  4. 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_starter exits 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/login and /search?keywords=varbase all 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_component itself, so installing the site template on a plain Drupal CMS codebase no longer fails with You have requested a synthetic service ("kernel").
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 70c58e2c on 1.0.x
    fix: #3622105 Install canvas_page_template_component from the recipe so...
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
Issue summary: View changes
Status: Active » Fixed
Issue tags: +varbase_starter-1.0.2

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.