Saving a filter format that includes the Markdown filter throws two fatals on sites that went through a CKEditor 5 migration:
- InvalidArgumentException: The configuration property id doesn't exist in ValidKeysConstraintValidator::getDynamicMessageParameters() — the extension settings array lacks an id key, so the dynamic schema type markdown.extension_settings.[%parent.id] cannot resolve.
- InvalidArgumentException in BaseExtension::validateSettings() — same missing id causes Mapping::get('id') to throw.
The root cause: the CKEditor 5 migration leaves a stale id: filter_null entry in the filter format config, which is later removed during a config import. Without it, extension data submitted by the form is keyed by extension ID rather than containing an id property, breaking schema resolution.
Fix (attached patch):
- ParserConfigurationForm.php: inject the extension ID as a
#type => 'value'element so submitted data always containsid; add#input => FALSEto the experimental notice element to prevent it from submitting a spurious experimental key. - BaseExtension.php: catch InvalidArgumentException from
Mapping::get('id')and skip validation gracefully. - markdown.schema.yml: declare
vertical_tabs: type: ignore(form widget submits an __active_tab value into this namespace); add missingmarkdown.extension_settings.commonmark-footnotesschema; add missing constraints to the Table of Contents style key.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 3587572-4.patch | 4.25 KB | norman.lol |
| #3 | 3587572-3.patch | 3.29 KB | norman.lol |
Issue fork markdown-3587572
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
Comment #2
norman.lolComment #3
norman.lolComment #4
norman.lolComment #6
norman.lolFirst patch targets 3.0.1 release. Now attaching patch same from the MR targeting 3.0.x-dev.
Comment #7
norman.lol