All config in Drupal 8 should have a matching schema at config/schema/MODULE.schema.xml.
Although Smart Trim does not have its own top-level config object, it has a field formatter settings form. This means that Smart Trim creates config at core.entity_view_display.*.*.* with keys content.*.settings.trim_length
content.*.settings.trim_type etc.
The module config_inspector is a useful tool to show the errors. It reveals 8 errors for each Smart Trim field - one per configuration field.
The matching schema should be similar to the field formatters defined in Drupal core, for example see field.formatter.settings.image in image.schema.yml. It needs to be something like this:
field.formatter.settings.smart_trim:
type: mapping
label: 'Smart Trim field display format settings'
mapping:
trim_length:
type: integer
label: 'Trim length'
trim_type:
type: string
label: 'Trim units'
....The consequences of the missing schema are modest at present as Drupal does not normally rigorously enforce the schema. Some config import/export/analysis/display tools might not work properly. However now that the D8 version of the module is stable it would be useful to get the schema in place. The majority of D8 contrib modules I am using have the correct schema.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2851703-2.patch | 1.16 KB | sardara |
Comments
Comment #2
sardara commentedThere we go with a patch.
Comment #3
sandervd commentedFixes the schema errors, looks fine!
Comment #5
markie commentedPatch has been accepted and pushed into the 1.x-dev branch. Will tag and bag a new release later today.