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.

CommentFileSizeAuthor
#2 2851703-2.patch1.16 KBsardara

Comments

AdamPS created an issue. See original summary.

sardara’s picture

Title: Missing schema.xml » Missing schema.yml
Status: Active » Needs review
StatusFileSize
new1.16 KB

There we go with a patch.

sandervd’s picture

Status: Needs review » Reviewed & tested by the community

Fixes the schema errors, looks fine!

  • markie committed f97f934 on 8.x-1.x authored by sardara
    Issue #2851703 by sardara: Missing schema.yml
    
markie’s picture

Status: Reviewed & tested by the community » Fixed

Patch has been accepted and pushed into the 1.x-dev branch. Will tag and bag a new release later today.

Status: Fixed » Closed (fixed)

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