Some bulk form field options are missing schema

Created on 28 January 2021, about 5 years ago
Updated 14 January 2026, 17 days ago

Problem/Motivation

In #3117171: Bulk Form field for SAPI , we've introduced a the bulk form SAPI field. As we've used SearchApiFieldTrait, this trait adds 4 default options (link_to_item, use_highlighting, multi_type, multi_separator), the field will receive these options, even, I think, it doesn't need them. As the options schema of search_api_bulk_form plugin is the same as for views.field.bulk_form, we're getting:

views.view.*:display.default.display_options.fields.search_api_bulk_form.link_to_item failed with: missing schema

on a config sanity test that we're running.

Proposed resolution

I see 2 options:

  1. Quick fix: Add missed mapping to views.field.search_api_bulk_form schema.
  2. Complex fix:
    • Keep in SearchApiFieldTrait only methods regarding these field plugin options: ::defineOptions(), ::buildOptionsForm(), etc and all the logic that depends on these options (not an easy job!).
    • Move the other methods and logic in a new trait.
    • Use the new trait in SearchApiFieldTrait. In this way we are not breaking BC.
    • In SearchApiBulkForm use the new trait.

The 1st approach is effective, the 2nd is too complex. I will provide a fix for the 1st, while discussing all options.

Remaining tasks

None.

🐛 Bug report
Status

Active

Version

1.0

Component

Views integration

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

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

Merge Requests

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