Problem/Motivation
After a fresh install the site serves pages built from caches that were populated mid-install, before the recipe's content finished importing. Two distinct symptoms, both cleared by a single drush cr, with no other change.
- Menu blocks render empty. The header's main navigation row and the footer's links are absent from the markup entirely (no nav element, no nav-menu component), even though the menus hold their links:
SELECT menu_name, COUNT(*) FROM menu_link_content_datareports main 7, footer 6, social-media-menu 4, and the menu tree API reports 7 enabled items for main and 5 for footer. Afterdrush crthe same request returns the full navigation and the footer links. - Every page answered HTTP 500 on a Drupal CMS browser install, immediately after the install batch finished, with 19 watchdog entries of
NoCorrespondingEntityClassException: The Drupal\canvas\Entity\PageVariant class does not correspond to an entity type.Afterdrush crevery page returned 200. This is the same family as theredirect/ultimate_cron_jobfatal recorded for Horizon Aid in #3620718.
Where it showed up, from a full matrix run of four installs:
- Drupal CMS + browser installer: both symptoms.
- Drupal CMS +
drush si: the empty menu blocks. - Varbase 11 +
drush si, and Varbase 11 + browser installer: neither symptom. Those two installs came up clean, with 0 watchdog entries and every page 200.
Why it matters: a site builder who installs and opens the front page sees a site with no navigation, or in the Drupal CMS browser-install case a site-wide 500 that also takes out /user/login, with no indication that a cache rebuild is the remedy.
Observed on 1.0.x (commits 15edaa2 and 3700e69), Drupal CMS 2.1.4 and Varbase 11, Drupal core 11.4.6, Canvas 1.11.0.
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 -s https://my-drupal-cms-rightup.ddev.site/ | grep -c "<nav"
Then run ddev drush cr and repeat the same curl: the navigation appears.
Proposed resolution
To be established. Directions worth checking, in order:
- Whether the recipe should rebuild caches as its final step, so that what the installer leaves behind is coherent. Horizon Aid's #3620718 raises the same question for the entity-type fatal.
- Whether the menu block render caching is simply not invalidated by the default-content import that creates the menu links, in which case the fix may belong with whatever imports that content rather than with this recipe.
- Whether the difference between the Drupal CMS and Varbase bases points at a module set specific to Drupal CMS, which is what #3620718 suspects for the entity-type fatal.
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
- None intended. The symptom is that a freshly installed site renders without its navigation until caches are rebuilt.
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- Fixes a fresh install serving stale caches, where the main and footer menus rendered empty until a cache rebuild.
Comments