Problem/Motivation
Installing a site template through the browser installer (/core/install.php) intermittently fails during the recipe config batch with a PluginNotFoundException. It surfaces in two forms, seen on two different site templates:
PluginNotFoundException: The "redirect" entity type does not exist in Drupal\Core\Entity\EntityTypeManager->getDefinition()
PluginNotFoundException: Unable to determine class for field type 'image' found in the 'field.storage.user.user_picture' configuration
Both are the same mechanism: config that references a plugin whose providing module is not visible in that request. The redirect case reaches the entity type through trash's TrashEntityTypeManager decorator; the image case comes from drupal_cms_authentication applying core's user_picture recipe, which installs image and strictly imports that field storage.
Two things narrow it down:
- It fires only in the browser installer's AJAX batch. The same recipes, on the same codebase, install cleanly under
drush site:installevery time. - It is intermittent. A second browser install of the same template on the same codebase completed with no error, and the affected site is fully healthy after a
drush cr: the module was installed all along.
That points at container / module-registration staleness between batch requests in the RecipeKit install path, rather than at any individual recipe. Note the drush path masks it: builders typically run a cache rebuild straight after site:install, so the stale container never serves a request.
Steps to reproduce
- Build a Varbase 11 project with a site template available in
recipes/. - Drop the database and go to
/core/install.php. - Pick the site template, complete the site-name and account steps, and let the batch run.
- Intermittently the batch stops with one of the two exceptions above. Repeat the install to see it pass.
Proposed resolution
Not yet determined, and deliberately not guessed at from the observations so far. The candidates are:
- Rebuild the container (or the entity type definitions) between recipe applications in the installer's batch, so config referencing a just-installed module resolves.
- Handle it where the decorator and the strict config import sit, upstream in
trash,redirector RecipeKit.
Filed as a report so the traces and the drush-versus-browser evidence are recorded. Reproducing it reliably is the first task.
Remaining tasks
- ✅ File an issue
- ❌ Reproduce reliably and identify where the fix belongs
- ❌ 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
User interface changes
- N/A
API changes
- N/A
Data model changes
- N/A
Release notes snippet
- N/A
Comments