Missing schema for new settings

Created on 4 March 2025, 7 months ago

Problem/Motivation

Mercury Editor schema is missing values for newest settings and is causing PHPUnit tests to fail.

🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇺🇸United States sethhill

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

Merge Requests

Comments & Activities

  • Issue created by @sethhill
  • Issue was unassigned.
  • Status changed to Needs review about 1 month ago
  • 🇮🇳India karavkars@gmail.com

    Hello @damienmckenna,
    Applied your patch enabled module, Settings created correctly No errors.
    I confirm that module is working after applying patch.
    Also verified schema is defined correctly as type:integer.
    Regards,

  • First commit to issue fork.
  • 🇷🇴Romania bbu23

    During a fresh Drupal 11.2.3 installation from existing configuration, the mercury_editor module reports two distinct schema validation warnings:

    1. From the mercury_editor.menu.settings configuration:

    [warning] Schema errors for mercury_editor.menu.settings with the following errors: mercury_editor.menu.settings:groups non-scalar value but not defined as an array (such as mapping or sequence).
    

    2. From the mercury_editor.settings configuration:

    [warning] Schema errors for mercury_editor.settings with the following errors: mercury_editor.settings:rollover_padding_block missing schema, mercury_editor.settings:rollover_padding_inline missing schema.
    

    The existing MR updates the module's schema to properly define the data types for mercury_editor.menu.settings:groups and adds schema definitions for mercury_editor.settings:rollover_padding_block and mercury_editor.settings:rollover_padding_inline.

    This resolves all the reported schema warnings only for new module installs, not for existing ones. I've added a post update hook to address existing configs that have empty groups as array.

  • 🇺🇸United States vetchneons

    I'm glad I found this issue!

    I would like to confirm that this removed the warning for me on a new install. I am not able to test with a new install.

Production build 0.71.5 2024