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

Created on 26 July 2024, about 1 month ago
Updated 9 August 2024, 29 days 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 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

Needs work

Version

11.0 πŸ”₯

Component
PluginΒ  β†’

Last updated about 13 hours ago

Created by

πŸ‡³πŸ‡±Netherlands Willempje2

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024