Problem/Motivation
Installing the Educare recipe on a plain drupal/cms host aborts:
In ContainerBuilder.php line 1104: You have requested a synthetic service ("kernel"). The DIC does not know how to construct this service.
The cause is in this recipe, not upstream. Canvas installs canvas_page_template_component lazily, while the recipe is being applied. Installing a module part-way through RecipeAppliedEvent rebuilds the container, and in the rebuilt ContainerBuilder the kernel service is synthetic and unset, so the next hook resolution that needs it throws. The verbose log shows the two events back to back:
[info] canvas_page_template_component module installed. [info] Fixed component version hashes in config: canvas.page_region... -> You have requested a synthetic service ("kernel").
This was previously diagnosed here as an unfixable upstream Canvas defect. That diagnosis was wrong: the recipe can prevent the mid-event module install entirely.
Credit: this is the same fix as Horizon Aid #3622092, horizonaid!83, which found it first.
Steps to reproduce
ddev composer create-project drupal/cms ddev composer config minimum-stability dev ddev composer require drupal/educare ddev drush si -y ../recipes/educare
- Run the above on a clean DDEV project (Drupal 11.4.6, Canvas 1.11.0).
- The install aborts with exit 1 and the synthetic-service error above.
Proposed resolution
One line: declare canvas_page_template_component in the recipe's own install: list, so the module is already installed before RecipeAppliedEvent runs and no container rebuild happens mid-event. No patch is involved.
Shipping alongside it in the same change, and cosmetic and independent of the fix — a reviewer should read the .gitlab-ci.yml hunk as unrelated to the defect: rename the CI job 📦 (Drupal CMS) Install Educare site template to 📦 Drupal CMS - Educare. The old name was long enough to be truncated in the pipeline view, which hid the identifying part at the end. Renamed in all five places, including the needs: reference in 🧪 Functional — miss that one and the gate dangles and breaks. The 📦 prefix is kept to match the sibling jobs.
Together: 2 files, +6/-5 — recipe.yml +1 for the fix, .gitlab-ci.yml +5/-5 for the rename.
Verification
Verified end to end on the clean-room build above:
- Before: exit 1, the install aborts.
- After: exit 0, "Installation complete", 0 errors, 3 warnings, with 12 canvas pages, 40 events, 20 programs, 15 news and 3 pages imported.
Also verified in a real browser: /, /about, /programs, /news and /contact-us all render with 0 console errors, and the contact form, the header search field and the Programs listing (Showing 1-12 of 12 with the Undergraduate and Graduate toggle) all work.
The 3 remaining warnings are the separate, pre-existing views_exposed_filter_block:search-block_1 recipe-ordering warnings. This change does not fix those and does not claim to.
Remaining tasks
- ✅ File an issue
- ❌ Addition/Change/Update/Fix
- ❌ Rename the CI install job to 📦 Drupal CMS - Educare (cosmetic, independent of the fix)
- ❌ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ 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 educare-1.0.2
User interface changes
- N/A
API changes
- N/A
Data model changes
canvas_page_template_componentis now installed by the recipe rather than lazily by Canvas. The set of installed modules after a successful install is unchanged.
Release notes snippet
- Fixed the recipe install aborting on a plain Drupal CMS host with a synthetic service ("kernel") error, by installing canvas_page_template_component from the recipe instead of letting Canvas install it mid-event.
AI-Generated: Yes
Issue fork educare-3622106
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 #2
rajab natshahComment #8
rajab natshah✅ Released educare-1.0.2
Comment #10
rajab natshah