Problem/Motivation

A fresh RightUp install on Drupal CMS exits 0 with no warnings, but every front-end page answers HTTP 500: /, /features, /blog, /about-varbase, /contact-us, /user/login and /search.

Reproduced on Drupal core 11.4.6, drupal/canvas 1.11.0, drupal/rightup 1.0.x-dev at e2699b0, drupal/vartheme_bs5_rightup 1.0.x-dev at 331128e.

OutOfRangeException: The requested version `1fabce12570a28f0` is not available.
Available versions: `5398ac38a86f677e`, `ab1b678dc1806d89`, `89c883e11d4f832c`, `5a87298f3691cd43`.
in Drupal\canvas\Entity\VersionedConfigEntityBase->assertVersionExists()

config/canvas.page_region.vartheme_bs5_rightup.header.yml (added in #3620717) pins two components to versions that no shipped component config declares:

  • sdc.vartheme_bs5_rightup.icon-toggle@1fabce12570a28f0; the recipe ships active ab1b678dc1806d89
  • sdc.vartheme_bs5_rightup.button@89760b927a14a505; the recipe ships active 7c8b7b626a4fbd83

The header renders on every page, so the whole front end is down. The header also uses sdc.vartheme_bs5_rightup.offcanvas-menu, whose component config the recipe does not ship at all. Its version resolves today only because it matches whatever the theme's code hashes to on install day, so the next change to that component in the theme breaks the header the same way.

Nothing in CI checks that a shipped component tree references a declared version.

Steps to reproduce

mkdir -p my-drupal-cms-rightup && cd my-drupal-cms-rightup
ddev config --project-type=drupal11 --docroot=web
ddev composer create-project drupal/cms
ddev composer config minimum-stability dev
ddev composer require drupal/rightup:1.0.x-dev
ddev drush si -y ../recipes/rightup
curl -sk -o /dev/null -w '%{http_code}\n' https://my-drupal-cms-rightup.ddev.site/

Proposed resolution

  • Point the header's icon-toggle and button at the active versions the recipe ships (ab1b678dc1806d89, 7c8b7b626a4fbd83). These are the versions every other shipped tree already uses, and Canvas keeps them in the installed version history.
  • Ship config/canvas.component.sdc.vartheme_bs5_rightup.offcanvas-menu.yml, so the header's offcanvas-menu reference no longer depends on install-day hashing.
  • Add a validate-stage CI job, .gitlab-ci/check-canvas-component-versions.py, that fails when any tree in config/ or content/ references an undeclared or unshipped component version (active is accepted). Against the current 1.0.x it reports all three problems and exits 1.

Verification

A fresh DDEV project built with the steps above, with the fixed recipe in recipes/rightup, no patches and no cache rebuild after the install:

  • drush si exits 0, with no warnings or errors.
  • All seven pages above answer HTTP 200.
  • 0 of the 503 component instances on the site (pages, page regions, content templates, patterns) reference an unavailable version.
  • The CI check passes on the branch: 174 references, 0 invalid.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/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

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

RightUp's front end no longer returns HTTP 500 after a fresh install: the header references the component versions the recipe ships, and CI now rejects component trees pinned to undeclared versions.

Issue fork rightup-3622267

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’s picture

Status: Active » Needs review

Opened !19.

  • The header's icon-toggle and button now reference the active versions the recipe ships.
  • The recipe now ships the offcanvas-menu component config the header depends on.
  • A new validate-stage CI job, 🧩 Canvas component versions, fails on any component tree reference to an undeclared version. On 1.0.x it reports 3 invalid references and exits 1; on this branch it passes with 174 references and 0 invalid.

Verified on a fresh DDEV Drupal CMS project (steps in the summary), with no cache rebuild after the install: drush si exits 0, all seven front-end pages answer HTTP 200, and 0 of 503 component instances reference an unavailable version.

  • rajab natshah committed 15edaa2a on 1.0.x
    fix: #3622267 Point the header at the component versions the recipe...
rajab natshah’s picture

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.

rajab natshah’s picture

Issue tags: +rightup-1.0.0-alpha1

Status: Fixed » Closed (fixed)

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