I just had this error on a fresh Drupal install.
Drupal 10.1.2 with
gin
theme +ckeditor5
module enabled.I create a new editor and add the Style plugin.
Input the style
a.button|Button
and click outside the form element - so the input value is actually submitted.Click save.
Boom. Broken :(
- Status changed to Postponed: needs info
over 1 year ago 2:36pm 6 March 2024 - Status changed to Active
over 1 year ago 3:04pm 6 March 2024 Yes, fresh install of Drupal.
I've just retried and reproduce the issue.
It happens when you create a new text editor and you add all plugins.
Please find attached a screencapture with the first part where I install a fresh D10, I add a new CKE5 editor successfully - although there is always a bug on the first try - but then I add a new CKE5 editor with all options and it breaks.
I think these are the steps:
- Fresh D10 install
- Install with the standard profile `drush si standard -y`
- Enable CKE5 `drush en ckeditor5`
- Go to `/admin/config/content/formats/add`
- Select CKE5 plugin
- Add all buttons to the editor
- Add at least one style (ex: `a.button|Button`)
- Save the form
- Boom, broken
PS: video is too big for d.o so I've sent it on Slack here: https://drupal.slack.com/archives/C01GWN3QYJD/p1709737334307729?thread_t...
- 🇵🇱Poland salmonek
The issue occurs when all plugins are enabled.
The Validator that throws an Exception is loading all enabled and disabled plugins separately for some validation:
$disabled_plugin_elements = new HTMLRestrictions($this->pluginManager->getProvidedElements(array_keys($enableable_disabled_plugins), $text_editor, FALSE));
The problem is that getProvidedElements() returns all plugins in case first parameter is empty. I'll prepare a patch shortly. - 🇵🇱Poland salmonek
Here is the patch against 10.2.2
matthieuscarset, I can send you patch for 10.1.2 on Slack in case this won't workBTW: Wim when I'm posting a patch with name format {issue_number}-{comment-number} do I have to put {comment-number} manually and hope that nobody else will post or can the name be somehow generated automatically?
- Status changed to Needs review
over 1 year ago 4:16pm 6 March 2024 - Status changed to Needs work
over 1 year ago 4:44pm 6 March 2024 The Needs Review Queue Bot → tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request → . Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
- 🇳🇿New Zealand quietone
I reproduced the error on a fresh install of 11.x.