Problem/Motivation
A fresh Drupal CMS install with the RightUp site template picked in the installer finishes, then redirects to /admin/dashboard/welcome, which returns HTTP 500. The install also logs about 250 errors. Measured on a clean build:
81 canvas Twig\Error\LoaderError, vartheme_bs5_rightup:section is not defined 66 php Undefined array key "target_id" / Undefined array key "" 61 system ComponentNotFoundException for vartheme_bs5_rightup:section 40 search_api The theme stark does not exist or is not installed 17 system block plugin not found
One drush cr clears all of it and the finished site is correct: every page 200, entities load clean, no pending entity schema updates. But that is not what someone doing a browser install sees.
Root cause. The content search index has index_directly: true, so every node the recipe imports is indexed inline, which renders it in the search_index view mode. During the install the active theme is still the one the request started with, stark, which is not installed, because the theme is negotiated once per request and cached, so setting system.theme mid-request does not reach the renderer. The search_api failures are the direct symptom; the Canvas and component errors are the same render path failing on components that are not registered yet.
Steps to reproduce
- Build a fresh Drupal CMS site and run the browser installer.
- Pick the RightUp site template at the installer's template step and finish the install.
- The installer redirects to
/admin/dashboard/welcome, which returns HTTP 500. drush watchdog:show --count=500shows roughly 250 errors in the classes above.
Proposed resolution
Index on cron instead of on save, as a config action on the index the recipe already configures:
search_api.index.content: simpleConfigUpdate: options.index_directly: false
Nothing renders during the install, so all five error classes go away. Content is indexed on the first cron run.
It has to be merged into the recipe's existing search_api.index.content action, not added as a second one: two actions with the same key silently collapse to one in YAML.
Remaining tasks
- ✅ File an issue
- ❌ Addition/Change/Update/Fix
- ❌ Testing to ensure no regression
- ❌ Verify on a fresh browser install that the welcome dashboard returns 200 and the watchdog is clean
- ❌ Confirm search results still appear after cron
- ➖ 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
- A fresh install no longer ends on an HTTP 500. The content search index is built on cron instead of during the install.
Issue fork rightup-3624787
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 natshahReleased in rightup 1.0.0-alpha1.
Comment #6
rajab natshah