Unclear validation errors when upgrading text formats to CKEditor 5

Created on 30 August 2023, over 1 year ago
Updated 4 November 2023, about 1 year ago

Problem/Motivation

I'm getting the following validation error when trying to change my text formats from CKE4 to CKE5:

The current CKEditor 5 build requires the following elements and attributes:

(list of HTML attributes)

The following elements are missing:

(the same list of HTML attributes)

The message is found in Drupal\ckeditor5\Plugin\Validation\Constraint\FundamentalCompatibilityConstraint

Steps to reproduce

I'm following the How to upgrade from CKEditor 4 to CKEditor 5 guide.

I am unable to save each format as CKE5, and I can't determine what I need to do to get past the validation errors. It happens for every text format I try.

  1. I am on the latest 9.5.x
  2. I upgraded to CKEditor CodeMirror 3.x, which is for CKE5
  3. I installed CKEditor 5 (both 4 and 5 are enabled)
  4. I am configuring my text format, and select CKEditor 5
  5. I get the above validation error and cannot save the form

My text formats all use "Limit allowed HTML tags and correct faulty HTML". The list of HTML tags in the validation error is the same list that is allowed in this setting.

I had to disable the filter provided by Noopener Filter , then I could save the text formats.

However, the only reason I could figure out the source of the problem was to set a breakpoint on this line (718) in CKEditor5.php

$form_state->getCompleteFormState()->setErrorByName($form_item_name, $violation->getMessage());

It'd be really helpful if the form item actually was highlighted in red or focused or something.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Fixed

Version

9.5

Component
CKEditor 5 

Last updated 1 day ago

Created by

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

Comments & Activities

Production build 0.71.5 2024