SchemaIncompleteException when saving Views with Facets filters - Missing processor schema definitions

Created on 10 July 2025, 8 days ago
Updated 15 July 2025, 3 days ago

Problem/Motivation

When configuring facets with Views, the system throws schema validation errors because the configuration schema for views.filter.facets_filter is either missing or incomplete. This affects:

  • Facet processor configurations
  • Facet filter settings in Views
  • Configuration export/import processes
  • Site building workflows that rely on proper schema validation

Steps to reproduce

  1. Clean site install: Drupal 10.4.6 Core version
  2. composer require drupal/search_api
  3. vendor/bin/drush en search_api
  4. vendor/bin/drush en search_api_db
  5. Create a Search API Database: Database (default settings)
  6. Create a Search API Index using Database: Index (default settings)
  7. Add Fields to the Index (Title (indexed), Body (indexed), Content type (indexed))
  8. Create a View using Index as datasource, by creating a Page as Unformatted list of fields
  9. Add Fields to the view
  10. composer require drupal/facets
  11. composer require drupal/facets_exposed_filters
  12. vendor/bin/drush en facets
  13. vendor/bin/drush en facets_exposed_filters
  14. Add filter to the view (Content Type (Facet))
  15. Configure extra settings for filter criterion Facet: Content type (type)
  16. Sort results by: Sort by display value (ASC)
  17. Try to save the view → The website encountered an unexpected error. Try again later.

Expected Behavior

  • No schema validation errors when configuring facets with Views

Actual Behavior

  • Fatal error when saving view: "The website encountered an unexpected error. Try again later."
  • Specific error: Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.faceted_view with the following errors: views.view.faceted_view:display.default.display_options.filters.facets_type.facet.processor_configs.display_value_widget_order.settings.sort missing schema
  • Configuration validation failures prevent saving faceted views

Proposed resolution

Add proper schema definitions for the facets views filter, including:
Required Schema Elements:

views.filter.facets_filter:
  type: views_filter
  label: 'Facets filter'
  mapping:
    hierarchy:
      type: boolean
      label: 'Show hierarchy'
    label_display:
      type: string
    facet:
      type: mapping
      mapping:
        query_operator:
          type: string
          label: 'Query operator'
        min_count:
          type: integer
          label: 'Minimum count'
        show_numbers:
          type: boolean
          label: 'Show numbers'
        processor_configs:
          type: mapping
          label: 'Processor settings'
          mapping:
            translate_entity:
              type: mapping
              label: 'Translate entity processor'
              mapping:
                processor_id:
                  type: string
                  label: 'The plugin ID of the processor'
                weights:
                  type: sequence
                  label: 'The processor weights for different processing stages'
                  sequence:
                    type: integer
                    label: 'The processor weight for this stage'
                settings:
                  type: plugin.plugin_configuration.facets_processor.translate_entity
                  label: 'Translate entity processor settings'
            boolean_item:
              type: mapping
              label: 'Boolean item processor'
              mapping:
                processor_id:
                  type: string
                  label: 'The plugin ID of the processor'
                weights:
                  type: sequence
                  label: 'The processor weights for different processing stages'
                  sequence:
                    type: integer
                    label: 'The processor weight for this stage'
                settings:
                  type: plugin.plugin_configuration.facets_processor.boolean_item
                  label: 'Boolean item processor settings'
            term_weight_widget_order:
              type: mapping
              label: 'Term weight widget order processor'
              mapping:
                processor_id:
                  type: string
                  label: 'The plugin ID of the processor'
                weights:
                  type: sequence
                  label: 'The processor weights for different processing stages'
                  sequence:
                    type: integer
                    label: 'The processor weight for this stage'
                settings:
                  type: plugin.plugin_configuration.facets_processor.term_weight_widget_order
                  label: 'Term weight widget order processor settings'
            display_value_widget_order:
              type: mapping
              label: 'Display value widget order processor'
              mapping:
                processor_id:
                  type: string
                  label: 'The plugin ID of the processor'
                weights:
                  type: sequence
                  label: 'The processor weights for different processing stages'
                  sequence:
                    type: integer
                    label: 'The processor weight for this stage'
                settings:
                  type: plugin.plugin_configuration.facets_processor.display_value_widget_order
                  label: 'Display value widget order processor settings'

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇷🇸Serbia korinna.mucsi

Live updates comments and jobs are added and updated live.
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