How should we validate Views display extenders in config schema?

Created on 8 February 2024, 10 months ago
Updated 8 July 2024, 5 months ago

Problem/Motivation

In πŸ“Œ Adopt PluginExists validator in relevant places RTBC , we added many validation constraints to config schema ensuring that any plugin IDs mentioned in config do, in fact, exist.

One notable exception is Views' concept of display extenders. These things are, in a word, inscrutable. They are not used anywhere in core. Their existing config schema is extremely vague. What even are they? Do they need validation? They are clearly powered by plugins (\Drupal\views\Plugin\views\display_extender\DisplayExtenderPluginBase)...so, like, do they have plugin IDs stored in config anywhere...?

Proposed resolution

If display extenders are things that can have plugin IDs that are stored in config, add validation constraints for that, along with the relevant test coverage.

User interface changes

None.

API changes

None anticipated.

Data model changes

None anticipated.

Release notes snippet

TBD

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 4 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

Comments & Activities

  • Issue created by @phenaproxima
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    What even are they?

    🀣

  • Status changed to Active 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Blocker is in!

  • πŸ‡¬πŸ‡§United Kingdom scott_euser

    Is there any example we could follow here? I guess we need to validate that the string in views.settings.yml > views.settings > mapping > display_extenders is a valid plugin.

    Similar to:

                constraints:
                  PluginExists:
                    manager: plugin.manager.views.display
    

    Except in this case we do not have a plugin manager, so perhaps actually the first step is to create a plugin manager for them?

    At the moment they are fetched in core/modules/views_ui/src/Form/AdvancedSettingsForm.php via Views::fetchPluginNames('display_extender') for example.

Production build 0.71.5 2024