[meta] Much Views UI input is not validated

Created on 13 December 2014, almost 10 years ago
Updated 5 July 2024, 5 months ago

Problem/Motivation

In #2341357: Views entity area config is not deployable and missing dependencies β†’ , we identified the fact that no validation is done on the entity ID configuration field. This problem likely exists in numerous Views plugins. When an invalid value is entered, there is no validation error, and the area is silently empty with no indication of why it's not working.

Only 8 Views plugins implement the validation method, PluginBase::validateOptionsForm(). The related submit handler, submitOptionsForm(), has 13 usages, but since many plugins don't need to explicitly implement the submit method, there are likely many places that the validation method should be added.

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->

Proposed resolution

  • Implement PluginBase::validateOptionsForm() in plugins that need input validation.

Remaining tasks

  • Identify plugins that do not have validation.
  • Evaluate which of these plugins need to implement validation.
  • File issues to add validation where appropriate.

User interface changes

  • Users will receive a validation error upon entering invalid values in the entity area handler and other plugins currently missing validation.

API changes

  • None; the needed method already exists.
🌱 Plan
Status

Active

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 2 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States xjm

Live updates comments and jobs are added and updated live.
  • VDC

    Related to the Views in Drupal Core initiative.

  • Triaged core major

    There is consensus among core maintainers that this is a major issue. Only core committers should add this tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024