Allow recipe command to write to the container - ensuring that cache does not be cleared after a recipe installs a module

Created on 17 October 2022, about 2 years ago
Updated 4 July 2024, 6 months ago

Problem/Motivation

After installing a module via a recipe, the cache needs to be cleared before the module can be used. Failing to do so results in a fatal error.

Steps to reproduce

Given this recipe code:

# a simplified recipe
name: 'Pathauto example recipe'
description: "An example recipe showing the activation of the pathauto module"
type: 'Content'
install:
  - pathauto

After installing the recipe using the php script, and receiving a success command, visiting the `/admin/config/search/path` results in an error:

Drupal\Component\Plugin\Exception\PluginException: Plugin (path) instance class "Drupal\pathauto\PathautoItem" does not exist. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 97 of /app/web/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).

Clearing manually the cache (with drush cr for example) returns the site to normal, and I am able to visit the page to set pathauto settings etc.

Proposed resolution

A cache clearing operation could be added after a module is enabled by a recipe?

🐛 Bug report
Status

Fixed

Version

10.3

Component
recipe system 

Last updated 2 days ago

Created by

🇫🇮Finland vermario

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024