Problem/Motivation

The excel_export Views display plugin (provided by this module) declares a displays option in ExcelExportDisplayTrait::defineOptions():

$options['displays'] = ['default' => []];

This is the standard "Attach to" sequence used by data-export-style displays. The schema in config/schema/xls_serialization.views.schema.yml for views.display.excel_export does not declare a mapping entry for displays, so Configuration Inspector reports a "missing schema" row on every view that has an excel_export display.

Steps to reproduce

  1. Have a view with an excel_export display (the module's main use case).
  2. Open it in Configuration Inspector (admin/config/development/configuration/inspect).
  3. Observe a "missing schema" entry on display.{id}.display_options.displays.

Proposed resolution

Add the same displays mapping that views.display.data_export uses upstream:

views.display.excel_export:
  type: views.display.rest_export
  label: 'Excel export display options'
  mapping:
    displays:
      type: sequence
      label: 'Attach to'
      sequence:
        type: string
        label: 'Display'
    filename:
      ...

Procedure for existing sites

Sites whose excel_export display was last saved as a freshly created display may have displays.default stored as integer 0 instead of string '0'. After this MR lands those sites will see one residual schema error:

display_options.displays.default: variable type is integer but applied schema class is StringData

To clear it, edit the view, save it (no changes needed). The Views save normalises the unchecked checkbox values to strings.

Remaining tasks

  • Review the MR.
  • Ship in 2.1.x and 2.0.x and 8.x-1.x as schema-only follow-up to #3171239.

Test coverage

No new test added. The change is config schema only and is verified by Configuration Inspector returning no errors against an excel_export display after applying the patch.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 7788e534 on 2.1.x
    fix: #3589220 Add missing schema for the "displays" (Attach to) option...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.