Cache Discovery | Plugin does not exist. Valid plugin IDs for....

Created on 26 July 2024, 9 months ago

Problem/Motivation

When deploying a change for a new plugin on a website, it is possible for the discovery cache to be set during config import (in an environment where the changes are not yet released). Because of this, the import does not recognize the new plugin and throws an error.

Steps to Reproduce

This is kind of hard to reproduce.
Create a new plugin (rest resource, for example) and run config import.
During config import (after webroot/core/lib/Drupal/Core/Extension/ModuleInstaller.php:277), invoke the cache for the same site but without this new change in it.
This should now throw an error that your new plugin does not exist.

Proposed Resolution

Add a deploy identifier to the cache_key in \Drupal\Core\Plugin\DefaultPluginManager::setCacheBackend.
This will create a cache_discovery different for each deployment. (see patch)

πŸ› Bug report
Status

Active

Version

10.2 ✨

Component
PluginΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡³πŸ‡±Netherlands willempje2

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024