- Issue created by @gkaas
- πΊπΈUnited States bronzehedwick New York
Tested against Drupal 11.x and can confirm this is a bug. On text configuration pages, such as
/admin/config/content/formats/manage/full_html
, there's a JavaScript error that breaks the CKEditor toolbar, as per above.TypeError: undefined is not an object (evaluating '[...dividers, ...available].find((button) => { return button.name === name; }).id')
On a node edit page that has the text format enabled that has the CKEditor Responsive Table button added, this JavaScript errors appears.
[Warning] toolbarview-item-unavailable (2) (ckeditor5-dll.js, line 5) Object item: "customTable" Object Prototype " Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-toolbarview-item-unavailable"
- Merge request !20Issue #3531230: Clean up configuration on uninstall β (Open) created by bronzehedwick
- πΊπΈUnited States bronzehedwick New York
I wrote a fix to address the issue. Please review when you have a chance @gkaas!
- Assigned to bronzehedwick
- Status changed to Needs review
about 1 month ago 9:36pm 2 September 2025 - First commit to issue fork.
@bronzehedwick I moved the function to the .install file since that's where it should go and I made some changes because it wasn't working well for me:
1-if ($key !== FALSE)
to cover the cases where the button is found in the first position.
2- saved thearray_values($toolbar_items)
instead of the array as it was because it wasn't removing it for me otherwise.Can you test it and see if it works well for you?
- πΊπΈUnited States bronzehedwick New York
Thanks @javi-er! I tested the updated code, but ran into the following JS console error when loading the editor page.
Uncaught TypeError: can't access property "id", [].find(...) is undefined
Here are the steps I took.
- Updated CKEditor Responsive Table code
- Enable the module:
drush en ckeditor_responsive_table -y
- Enable the button on the Basic HTML text filter
- Confirm the button works on a node edit page
- Confirm the
"customTable"
entry exists ineditor.editor.basic_html
config table - Disable the module:
drush pm-uninstall ckeditor_responsive_table -y
- Observe the
"customTable"
entry still exists ineditor.editor.basic_html
config table - Visit
/admin/config/content/formats/manage/basic_html
- Observe the above JS error