Problem/Motivation

When running Functional tests that extend the mercury_editor.module, the below schema error is thrown.

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for mercury_editor.settings with the following errors: mercury_editor.settings:mobile_presets.0 missing schema, mercury_editor.settings:mobile_presets.1 missing schema, mercury_editor.settings:mobile_presets.2 missing schema, mercury_editor.settings:dialog_settings._defaults missing schema

Proposed resolution

Create a simple Functional test to validate the config schema
.

Remaining tasks

TBD

User interface changes

N/A

API changes

N/A

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

jrockowitz created an issue. See original summary.

sethhill made their first commit to this issue’s fork.

jrockowitz’s picture

For example, you need could change

    mobile_presets:
      type: sequence
      label: 'Mobile preview present dimmensions'
      sequence:
        type: object
        label: 'Preview preset'

- to -

    mobile_presets:
      type: sequence
      label: 'Mobile preview present dimensions'
      sequence:
        type: mapping
        label: 'Mobile preview present dimension'
        mapping:
          name:
            type: text
            label: Name
          width:
            type: integer
            label: Width
          height:
            type: integer
            label: Height

sethhill’s picture

The MR should resolve schema structural errors. In reviewing, I noticed that the menu settings for Mercury behave differently from the dialog settings, in that menu is a string and dialog actually encodes/decodes YAML. I created #3494569: Groups config in mercury_editor.menu.settings should be YAML instead of string to update that, as the current behavior works. Converting to YAML decoding would allow greater detail in validating the schema and improve user experience.

jrockowitz’s picture

This looks good to me. Did it pass config inspection?

BTW the groups in mercury_editor.menu.settings.yml could be changes from a string of YAML to sequence/mapping so that it is translatable.

sethhill’s picture

Status: Active » Reviewed & tested by the community

The schema passes in Config Inspection but I do see 1 data error reported on the summary screen for mercury_editor.settings. It does not, however, show any errors on the detail screen and others have reported this behavior with the module. I think we should merge in and report any new errors separately. Thanks for the review!

  • sethhill committed 27cddf60 on 2.2.x
    Issue #3491742 by sethhill, jrockowitz:  Schema errors for...
sethhill’s picture

Status: Reviewed & tested by the community » Fixed
sethhill’s picture

Status: Fixed » Closed (fixed)