Schema errors for mercury_editor.settings

Created on 4 December 2024, 14 days ago

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

πŸ› Bug report
Status

Active

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

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

Merge Requests

Comments & Activities

  • Issue created by @jrockowitz
  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    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
    
  • Merge request !94#3491742: Update schema.yml. β†’ (Open) created by sethhill
  • πŸ‡ΊπŸ‡ΈUnited States sethhill

    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 πŸ“Œ Groups config in mercury_editor.menu.settings should be YAML instead of string Active to update that, as the current behavior works. Converting to YAML decoding would allow greater detail in validating the schema and improve user experience.

  • πŸ‡ΊπŸ‡ΈUnited States jrockowitz Brooklyn, NY

    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.

  • πŸ‡ΊπŸ‡ΈUnited States sethhill

    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!

Production build 0.71.5 2024