Views filter schema issues

Created on 13 August 2025, about 1 month ago

Problem/Motivation

The introduction of and use (x 3) of the views filter 'atv_column_field_filter ' creates 6 schema errors only when the View is edited and then exported. The filters were introduced in ✨ Convert some filters to dropdowns Active . This is not an urgent priority but would be a nice one to get resolved.

  • 'views.view.alt_text_report:display.default.display_options.filters.entity.value' => 'non-scalar value but not defined as an array (such as mapping or sequence)',
  • 'views.view.alt_text_report:display.default.display_options.filters.entity.expose.reduce' => 'missing schema',
  • 'views.view.alt_text_report:display.default.display_options.filters.bundle.value' => 'non-scalar value but not defined as an array (such as mapping or sequence)',
  • 'views.view.alt_text_report:display.default.display_options.filters.bundle.expose.reduce' => 'missing schema',
  • 'views.view.alt_text_report:display.default.display_options.filters.field_name.value' => 'non-scalar value but not defined as an array (such as mapping or sequence)',
  • 'views.view.alt_text_report:display.default.display_options.filters.field_name.expose.reduce' => 'missing schema',

I spent several days trying to resolve this with many variations of the schema defined /Users/steve.wirt/workspace/mods/modzilla/web/modules/contrib/alt_text_validation/config/schema/alt_text_validation.views.schema.yml

I was only able to resolve the errors by manually changing the following entries for each of the atv_column_field_filter filters in the View config export.

value: { } must become value: null
reduce: 0 must be deleted.

This makes the schema errors go away, but they will come back if the View is edited and exported.

There should be a better solution to this but I have not been able to find one.

Steps to reproduce

  1. Edit the alt text report View
  2. Export the View
  3. See errors reported either when running phpUnit tests or using the config_inspect module

Proposed resolution

Remaining tasks

User interface changes

API changes

Notes

I tried things like defining the schema like this

views.filter.atv_column_field_filter:
  type: views.filter.in_operator
  label: 'Report column filter'
  mapping:
    value:
      type: string
      label: 'Filter Value'
    operator:
      type: string
      label: 'Operator'
    exposed:
      type: boolean
      label: 'Exposed'

and


views.filter.atv_column_field_filter.entity:
  type: views.filter.in_operator
  label: 'Report column filter'
  mapping:
    operator:
      type: string
      label: 'Operator'
    value:
      type: sequence
      label: 'Values'
      nullable: true
      sequence:
        type: string
        label: 'Value'
        nullable: true
    expose:
      type: mapping
      label: 'Expose'
      mapping:
        reduce:
          type: boolean
          label: 'Reduce'
    group_info:
      mapping:
        group_items:
          sequence:
            type: views.filter.group_item.in_operator
            label: 'Group item'

None of them seemed to be having any effect.

I suspect that it comes from that filter supposed to be having checkboxes available in the filter config form to choose what values to apply to. The problem is the options are generated from the entries in the report, so they are not available to the View admin.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

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

Comments & Activities

Production build 0.71.5 2024