exception message in DiscoveryTrait doesn't work for Views plugin types

Created on 19 May 2025, 4 days ago

Problem/Motivation

This doesn't work for Views plugins, because they all use the same manager class:

> throw new PluginNotFoundException($plugin_id, sprintf('The "%s" plugin does not exist. Valid plugin IDs for %s are: %s', $plugin_id, static::class, $valid_ids));

This means you get an error like this:

> The "localgov_page_header_display_extender" plugin does not exist. Valid plugin IDs for Drupal\views\Plugin\ViewsPluginManager are: default

and you don't know which of the 5 or 6 different Views plugin types this is.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

views.module

Created by

🇬🇧United Kingdom joachim

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

Comments & Activities

Production build 0.71.5 2024