CKEditor 4 trying to load asset/vendor/ckeditor/config.js when using CkEditor 5

Created on 13 October 2023, 9 months ago
Updated 26 October 2023, 8 months ago

Problem/Motivation

I am seeing a bunch of JS errors in the Browser Dev Console when using the Rich Text (CKEditor5) editor:

ckeditor.js?v=4.18.0:253 Uncaught Error: [CKEDITOR.resourceManager.load] Resource name "default" was not found at "..../modules/contrib/ckeditor/vendor/styles.js?t=s2hlgn".
    at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.resourceManager.<anonymous> (ckeditor.js?v=4.18.0:253:334)
    at n (ckeditor.js?v=4.18.0:248:455)
    at Array.v (ckeditor.js?v=4.18.0:249:93)
    at x (ckeditor.js?v=4.18.0:249:177)
    at CKEDITOR.env.ie.d.$.onerror (ckeditor.js?v=4.18.0:250:200)

ckeditor.js?v=4.18.0:93     GET https://127.0.0.1:32955/modules/contrib/ckeditor/vendor/config.js?t=s2hlgn net::ERR_ABORTED 404 (Not Found)

a @ ckeditor.js?v=4.18.0:7
edit:1 Refused to execute script from '.../modules/contrib/ckeditor/vendor/config.js?t=s2hlgn' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

Steps to reproduce

- Do a fresh install of WxT 5.0.0
- Go to /admin/content and add a new node, use the Rich Text (CKEditor5) editor when inputting the content.

- Save it and then go back to the node edit page and open the Dev Tools, you'll see a bunch of warnings/errors:

Proposed resolution

I am guessing some contrib or custom module must be loading the core/ckeditor asset library directly or indirectly, so it should be changed or disabling the CkEditor4 modules in the next WxT 5 release should fix this.

Here's more information about that: https://www.drupal.org/project/drupal/issues/3327871 πŸ’¬ CKEditor 4 trying to load asset/vendor/ckeditor/config.js although CKEditor 5 is set Fixed

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

5.0

Component

User interface

Created by

πŸ‡¨πŸ‡¦Canada optasy

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

Comments & Activities

  • Issue created by @optasy
  • πŸ‡¨πŸ‡¦Canada smulvih2 Canada 🍁

    This looks like a file permissions/ownership issue. Check to make sure the file it’s referencing is in your codebase, then make sure perms are set correctly. Just to test might try disabling JS aggregation and see if that makes a difference.

  • πŸ‡¨πŸ‡¦Canada smulvih2 Canada 🍁

    Ahh I see, in the linked ticket they have CKE4 uninstalled and it still loads some JS from it.

    On a default install of WxT, both CKE4 and CKE5 are enabled, and you can toggle the text formats between 4 and 5 so it loads the JS for both. Will have to look at this in more detail next week, I haven’t noticed any issues with the default CKEditor setup.

  • πŸ‡¨πŸ‡¦Canada joseph.olstad

    I believe I've seen this recently, appears to be a bug with the contrib ckeditor project.

  • πŸ‡¨πŸ‡¦Canada SKAUGHT

    The linked issue is against 9.5 Drupal installs with ck4/5.

    Regardless, I an NOT myself seeing this error of the current (oct26/2023 5.0.x dev head). I can switch between all 4 formats i (admin role) have access to without and console errors at all.
    However the 'full html (ck5)' format seem like it's missing items...

Production build 0.69.0 2024