Config schema for entity_browser.browser.widget.file_upload is not accurate

Created on 25 June 2024, 5 days ago
Updated 28 June 2024, 2 days ago

Problem/Motivation

If you try to sync the config object entity_browser.browser.image_browser in Drupal 10.3 the newly added config validation fails with the following error message

> In Mapping.php line 38:
>                                                                                
>   The mapping definition at `entity_browser.browser.image_browser.widgets.44d  
>   52e51-9627-43b5-a637-3b0462041d1c.settings:upload_validators` is invalid: i  
>   ts `type` key contains a string. It must be an array. 

Steps to reproduce

  1. Try to install lightning_media (I Think it fails on installation also)
  2. Otherwise, delete the config object from your site
  3. Try to sync with drush cim -y - It will fail.

Proposed resolution

Adjust the config schema from Mapping to sequence. Upload-Validators are a list of functions with a list of arguments. The amount of functions and its arguments is not known before, you only can use sequences here.
Die current mapping structure is lacking if a hash to define mapping items.

πŸ› Bug report
Status

RTBC

Version

5.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany sunlix Wesel

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024