- πΊπΈUnited States DamienMcKenna NH, USA
Related: π views.settings config object should not be used to cache list of available plugins Active
Currently, when a plugin cannot be found, we get this obtuse error message:
Drupal\Component\Plugin\Exception\PluginException: The plugin (%plugin) did not specify an instance class in Drupal\Component\Plugin\Factory\DefaultFactory->getPluginClass() (line 60 of /path/to/webroot/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).
first, this is incorrect - what's usually happening is that no plugin definition was found, not that the found plugin definition did not specify an instance class. second, it gives us very little useful information about WHICH plugin actually failed - we just have the plugin id, not the owner/type information. that's a little tricky to get at.
introduce new exceptions - PluginNotFoundException
and DerivativeNotFoundException
- that can be thrown by the various Discovery implementations when plugins aren't actually found.
the exceptions still don't include contextual information about the plugin type when throwing exceptions. we could probably expand the DiscoveryInterface
to include such contextual information purely for the purpose of these exceptions.
any new Discovery classes, decorators, etc., should follow the practice of throwing the appropriate exception for their case.
Needs work
11.0 π₯
Last updated
Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Related: π views.settings config object should not be used to cache list of available plugins Active