Problem/Motivation

Schema for match_limit and webforms parameters are missing in entity reference autocomplete widget.

Steps to reproduce

  1. Setup this widget for your webform field in your entity form display
  2. Install config inspector
  3. You can see missing schema errors

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

lamp5 created an issue. See original summary.

lamp5’s picture

Status: Active » Needs review
StatusFileSize
new709 bytes
jrockowitz’s picture

StatusFileSize
new776 bytes

The webforms property can contain multiple strings.

lamp5’s picture

Hmm, intresting, I can see error when value is empty.

jrockowitz’s picture

I think we need to change the default value for webforms property from NULL to an empty array [].

jrockowitz’s picture

StatusFileSize
new1.11 KB

I think we need to the 'ignore' type.

lamp5’s picture

"Ignore" type it is not correct in my opinion, it is good for password form element type for example. Change default property for empty array sounds better.

jrockowitz’s picture

Setting it to an empty array breaks the existing code.

@see \Drupal\webform\Plugin\Field\FieldWidget\WebformEntityReferenceWidgetTrait::settingsForm

jrockowitz’s picture

StatusFileSize
new7.97 KB

Moving and refactory the default settings, settings form, and settings summary out of the trait is the most reliable approach.

jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed b5054cc on 6.x
    Issue #3252811 by jrockowitz, lamp5: Schema for match_limit and webforms...

  • jrockowitz committed b5054cc on 6.1.x
    Issue #3252811 by jrockowitz, lamp5: Schema for match_limit and webforms...

Status: Fixed » Closed (fixed)

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