Probably with the Drupal Core Update from 10.0.8 to 10.1.1, the CKEditor is no longer displayed if the Highlight Plugin is activated. This also leads to the CKeditor not being loaded/displayed at all due to the Javascript error.

ckeditor5.js?ryekvm:472 TypeError: Cannot set properties of undefined (setting 'ariaLabel')
    at Object.callback (highlight.js?ryekvm:1:12798)
    at $t.create (ckeditor5-dll.js?v=38.1.0:5:496934)
    at ckeditor5-dll.js?v=38.1.0:5:474313
    at Array.map (<anonymous>)
    at Ie._buildItemsFromConfig (ckeditor5-dll.js?v=38.1.0:5:474221)
    at Ie.fillFromConfig (ckeditor5-dll.js?v=38.1.0:5:474079)
    at n._initToolbar (editor-classic.js?v=38.1.0:4:6492)
    at n.init (editor-classic.js?v=38.1.0:4:6079)
    at editor-classic.js?v=38.1.0:4:9650

Current solution: Switch back to Drupal Core 10.0.x

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

cbeier created an issue. See original summary.

mahde’s picture

I am getting the same error with Drupal 10.1.5!

mahde’s picture

I fixed this by re-building the highlight.js file with the new version of "@ckeditor/ckeditor5-highlight": "~40.0.0" and "@ckeditor/ckeditor5-theme-lark": "~40.0.0", "ckeditor5": "~40.0.0" in the package.json file.

Hope to get this fixed in this module. Thanks!

arisen’s picture

I am getting the same error on Drupal 10.1.5. The fixes mentioned in #3 works perfectly fine.
Verified if the fixes are compatible with Drupal 9.5.11. It isn't working. Throwing error

TypeError: t.map is not a function
    at ue (ckeditor5-dll.js?v=35.4.0:5:447835)
    at Object.callback (highlight.js?s2rxpt:1:10856)
    at i.create (ckeditor5-dll.js?v=35.4.0:5:416819)
    at ckeditor5-dll.js?v=35.4.0:5:439488
    at Array.map (<anonymous>)
    at X.fillFromConfig (ckeditor5-dll.js?v=35.4.0:5:439398)
    at c._initToolbar (js_tdNyFRf0JHNvXCd9Fmk2k0H7Dmb7NBLR0o8jbyDEUz4.js:4:6337)
    at c.init (js_tdNyFRf0JHNvXCd9Fmk2k0H7Dmb7NBLR0o8jbyDEUz4.js:4:5924)
    at js_tdNyFRf0JHNvXCd9Fmk2k0H7Dmb7NBLR0o8jbyDEUz4.js:4:9072

Checking if any possible fixes for both Drupal 9 and 10.

jmcintyre’s picture

Updated dependency versions as mentioned in #3 and rebuilt highlight.js.

jmcintyre made their first commit to this issue’s fork.

godotislate’s picture

Status: Active » Needs review
el7cosmos’s picture

Version: 1.x-dev » 1.1.x-dev
Status: Needs review » Needs work

I think we should match 10.1 core's ckeditor5 version, which is 39

And yes, that won't work for <10.1, so this have to go to 1.1.x branch

godotislate’s picture

Status: Needs work » Needs review

Changed package.json dependencies to version 39.0.0, and target branch in the MR to 1.1.x. Looks like 1.1.x is behind 1.x right now, so can change target branch back if needed.

Also, rebuilt the JS, but there's no difference between the 40 build and 39 build.

fonant’s picture

Using plain diff from MR 2 as a patch works to make the button work here :)

el7cosmos’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.