Problem/Motivation
I am currently writing an article about my experience using CKEditor 5 experimental module on a realworld website. It has a few contributed / custom modules activated with format filters and CKEditor integrations. A few examples here are :
- Linkit version 6.0.0-beta3
- Layout Paragraph version 1.0.0
- Media Directories Editor version 2.0.2 : it integrate with the CKEditor
- CKEditor Templates version 8.x-1.2
- CKEditor Templates User Interface version 8.x-1.4
- Codesnippetgeshi version 8.x-2.0-beta1
- Font Awesome version 8.x-2.22
At the moment I convert my format to CKEditor 5 I get the following messages :

Those are a bunch of message that some of the CKEditor tools could not be converted due to contrib lack of upgrade path and therefore they are disabled. As a site builder, the green success color implies that everything is fine. While in fact, it informs me I will lose some functionality, I will expect a warning color at least, and eventually a message that helps me.
Steps to reproduce
- Install a Drupal 9.3 website
- Configure a text format to use CKEditor
- Add and configure contrib module such as CKEditor Templates for instance
- Convert the text format to CKEditor 5
Proposed resolution
As described above, I suggest a warning message rather than success, and expanding the message with a suggested action.
- Before

- After

| Comment | File | Size | Author |
|---|---|---|---|
| #43 | interdiff--9.3.x--41-43.txt | 1.45 KB | dom. |
| #43 | cke5_and_contributed--9.3.x--3273325-43.patch | 29.64 KB | dom. |
| #41 | cke5_and_contributed--9.3.x--3273325-41_reroll.patch | 29.64 KB | andregp |
| #40 | CKE4to5--after-40.png | 129.57 KB | dom. |
| #40 | interdiff--10.0.x--31-40.txt | 1.44 KB | dom. |
Issue fork drupal-3273325
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
wim leersComment #3
dom. commentedComment #4
ifrikI got a similar green status message when using the Anchor Link and Footnotes modules. In both cases, further action is needed, even though CKEditor 5 has taken some steps to mitigate the problem by adding additional HTML tags to "Source Editing". This message should therefore be a yellow warning, rather than a green success message.
Additionally: Several contrib modules are not yet working with CKEditor 5. Maybe we could have a page on d.o. that lists these modules with a link to their issue about CKEditor 5 compatability. This page could be updated when more modules are identified, or when updating a module will make it CKEditor 5 compatible.
A link to this page should be added to the status message. Then any user who is gets this message could directly find their way to the relevant information. And they might even help fixing the issue for the module that they rely on.
The wording in the message could be something like:
Not all modules on this site are compatible with CKEditor 5. Please check this page [link] for details.Comment #5
dom. commentedComment #7
wim leersComment #8
dom. commentedAfter deeper analyze of the subject, I noticed they are various types of messages that can be generated during the process. Therefore I had to take an opiniated decision on how to handle them as status, warning or error. The decision here is taken as follow:
Here is an exhaustive list of the message types and how I considered them.
Status messages :
Warning messages :
Error messages :
This would be an expected result following this rule :
Before example :

After example :

--
As of the subject of a message pointing to a listing documentation by @ifrik at #4, I personally like it in the theory, however I can't figure out a practical way to list all those module and to maintain this list up-to-date as of who would have such a responsibility ?
Comment #9
dom. commentedAdded a commit to do what's explained in #8 and see.
Tests are left untouched and therefore expected to fail at this point.
Comment #10
dom. commentedTests changed to reflect the message structure change and verify the desired message types.
Comment #11
wim leersSome
phpcsviolations:🤓
Comment #12
wim leersThe MR looks perfect to me: I 100% agree with your choices in which messages should be "status" (green), "warning" (yellow) or "error" (red) 👍
Once the MR is green, I will RTBC 🥳
Thanks so much!
P.S.: this helps #3245967: Messages upon switching to CKEditor 5 are overwhelming a lot too!
Comment #13
dom. commentedNow passes the tests and PHPCS
Comment #14
ifrikShould we still add a link to the documentation page about the status of different contrib modules that might get flagged up as part as the warning or errors?
The link is https://www.drupal.org/docs/core-modules-and-themes/core-modules/ckedito...
Comment #15
dom. commentedSure, I forgot about that part, let's cross with @wim-leers or @laurii about this.
Comment #16
ifrikSince this is currently a fork for 10.x it can't be tested on existing D( sites (with CKEditor plugins), but @dom is looking into that.
Comment #17
dom. commented@ifrik I should provide a patch for the other branches I suppose indeed.
Meanwhile pushing in the PR an additionnal message as suggested at #14 with a wording provided by @ifrik:
Comment #18
dom. commentedAdding patches for your convenience for the 3 branches. It a bit of a pain to maintain them three. Should it be ? Or working on D10 is enough ?
Comment #19
wim leersLooks perfect:

🤩
Comment #20
wim leersOnly a tiny typo to fix! :D
Comment #22
ifrikThe patch for 9.3 does not apply.
Comment #23
wim leersWow, that must be because 9.3 already changed in those few hours then! :D
Looks like we have one genuine test failure here: the new
basic_html_with_h1 can be switched to CKEditor 5 without problems, heading configuration computed automaticallytest case that was added by #3273527: Upgrade path never configures the ckeditor5_heading plugin to allow <h1> between the patch being posted and tested 🥳Comment #24
andregp commented@Wim leerrs, I hope I have done everything right updating the tests! 😊🙏
Comment #25
andregp commentedI forgot to change the status. Sending to NR
Comment #27
dom. commentedNice work @andregp ! That lets the last test to pass (at least with the 9.3.x patch, I have to check about what's wrong with that failure on the 10.0.x branch).
If I may though, in term of keeping the tests consistant : you changed the array merge of $basic_html_test_case['expected_messages'] by reimplementing the strings which is different than any other tests in file. They where updated by keeping the merge and making it array_merge_recursive because the new depth of the array. You can see that in action for a reference in other tests by search at the following:
'expected_messages' => array_merge_recursive($basic_html_test_case['expected_messages'], [--
This should stick with the pattern of merging with $basic_html_test_case['expected_messages'] as per others tests consistancy. It alo avoids duplicating strings in case of update in the future.
Comment #28
wim leersIMHO this ought to be a stable blocker.
Re-testing against D10 for #24 — that's an unrelated random failure for sure.
#27++ — could you address that perhaps, @andregp? 🙏😊
Comment #29
wim leersWe need to update the issue summary with clear before vs after screenshots. That will make this much easier to get committed.
Comment #30
dom. commentedAdding image on "after" the patch as described in #8 : let me update that comment become image was lost.
Comment #31
dom. commentedUpdated patch at #24 with feedback from #27.
Comment #32
dom. commentedUpdated before / after screenshots :
Before:

After:

NOTE1: we can see the various WARNING / ERROR messages types as decided, as well as the link to the handbook warning message.
NOTE2: the messages themselves may be reworked as part of #3245967: Messages upon switching to CKEditor 5 are overwhelming but it is out of scope of the current issue.
Comment #34
andregp commentedUnrelated test fail, sending back to needs review.
Comment #35
wim leersThanks, @Dom.!
Comment #36
wim leersAttempt to clarify title.
Comment #37
wim leersActually … those screenshots make it clear that I overlooked one thing in recent reviews: the "plugin settings" not having a known upgrade path should also be a warning, not an error. Because it's the same level of non-upgradeability; it's not worse than a button not having an upgrade path. In fact, usually the plugin settings will be associated with a button, and if that button does not exist, the settings are not needed anymore either.
I said this in-person at the DDD sprints, but I lost track of it — sorry! 😅
That then also means that the "Check this handbook page" message will be more clearly associated with all of the warning messages. 😊
Comment #38
dom. commentedTotally correct. And I also lost it in the way ! I will update the patch when I have time for it (or anyone can do actually :p).
Comment #39
wim leersThanks!
We'll also need an updated "after" screenshot 😊
Comment #40
dom. commentedHopefully I did not introduce any new errors here and every behave as expected.

Here is an updated screenshot of the result :
Comment #41
andregp commentedA commit in between patches changed:
'expected_superset' => '<code class="lang-*"> ' . $basic_html_test_case['expected_superset'],from SmartDefaultSettingsTest.php to
'expected_superset' => '<code class="language-*"> ' . $basic_html_test_case['expected_superset'],that's why patch #40 9.3.x didn't apply.
Here's a reroll.
Comment #43
dom. commentedDamn, I did not pull before the patch indeed ! This issue is trolling us !
Here is the updated 41 patch with tests pass.
Comment #44
wim leers#43: 🤣 yeah, #3269651: Update Drupal 9.3.x to CKEditor 5 v34.0.0 along with other un-backported issues finally happened, so now the 3 branches are 99% identical again! 👍
This looks perfect again! 🥳
Comment #45
alexpottCommitted and pushed dafde75531 to 10.0.x and 0936710171 to 9.4.x and d5d963b011 to 9.3.x. Thanks!