Saving a filter format that includes the Markdown filter throws two fatals on sites that went through a CKEditor 5 migration:

  1. 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.
  2. 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 contains id; add #input => FALSE to 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 missing markdown.extension_settings.commonmark-footnotes schema; add missing constraints to the Table of Contents style key.
CommentFileSizeAuthor
#6 3587572-4.patch4.25 KBnorman.lol
#3 3587572-3.patch3.29 KBnorman.lol

Issue fork markdown-3587572

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

norman.lol created an issue. See original summary.

norman.lol’s picture

Issue summary: View changes
norman.lol’s picture

Title: Fix InvalidArgumentException when trying to save text format » Fatal InvalidArgumentException on filter format save after CKEditor 5 migration
Issue summary: View changes
StatusFileSize
new3.29 KB
norman.lol’s picture

Issue summary: View changes

norman.lol’s picture

StatusFileSize
new4.25 KB

First patch targets 3.0.1 release. Now attaching patch same from the MR targeting 3.0.x-dev.

norman.lol’s picture

Status: Active » Needs review