Problem/Motivation
The config schema for the `iconify_field_icon_picker` widget declares the `collections` setting as `type: array`, which is not a valid Drupal config schema type. This causes a "missing schema" warning on any entity form display that uses the icon picker widget with the `collections` setting populated:
> Schema errors for core.entity_form_display.paragraph.usp.default with the following errors: core.entity_form_display.paragraph.usp.default:content.field_icon.settings.collections missing schema.
Tested on Drupal 11.3.9 with iconify_field 1.2.0.
Steps to reproduce
- Add an Iconify Field icon field to any entity (e.g. a paragraph type).
- Configure the widget and select one or more "Allowed collections".
- Save the form display.
- Visit `/admin/reports/status` or enable strict config schema validation.
- Observe the schema error for `content.field_icon.settings.collections`.
Proposed resolution
In `config/schema/iconify_field.schema.yml`, change `type: array` to `type: sequence` with a proper item definition:
field.widget.settings.iconify_field_icon_picker:
type: mapping
label: 'Iconify Field icon picker widget settings'
mapping:
default_collection:
type: string
label: 'Default collection'
collections:
type: sequence
label: 'Allowed collections'
sequence:
type: string
label: 'Collection'Patch attached.
Remaining tasks
Review and commit.
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | iconify_field-3594376-schema-collections-missing.patch | 362 bytes | strnbrg |
Issue fork iconify_field-3594376
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
Comment #2
strnbrg commentedComment #3
strnbrg commentedComment #4
dobefu commentedComment #7
dobefu commentedComment #9
dobefu commented