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

  1. Add an Iconify Field icon field to any entity (e.g. a paragraph type).
  2. Configure the widget and select one or more "Allowed collections".
  3. Save the form display.
  4. Visit `/admin/reports/status` or enable strict config schema validation.
  5. 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

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

strnbrg created an issue. See original summary.

strnbrg’s picture

strnbrg’s picture

Issue summary: View changes
dobefu’s picture

Assigned: Unassigned » dobefu

  • dobefu committed a531e0cb on 1.x
    fix: Resolve some schema issues (#3594376)
    
dobefu’s picture

Status: Active » 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.

dobefu’s picture

Assigned: dobefu » Unassigned
Status: Fixed » Closed (fixed)