Problem/Motivation
Hi,
My site was working perfectly well with Drupal 10.3 and CKEditor 5
After updating the site to Drupal 10.4 the entire site still works fine but when I edit existing content the CKEditor Wysiwyg editor no longer loads. The error in the console is: (Also attached a screenshot)Uncaught TypeError: Cannot read properties of undefined (reading 'attach')
at Object.editorAttach (editor.js?v=10.4.0:304:37)
at editor.js?v=10.4.0:228:18
at Array.forEach ()
at Object.attach (editor.js?v=10.4.0:211:52)
at drupal.js?v=10.4.0:166:24
at Array.forEach ()
at Drupal.attachBehaviors (drupal.js?v=10.4.0:162:34)
at big_pipe.js?v=10.4.0:153:10
at big_pipe.js?v=10.4.0:184:3When I add new content the editor is loaded initially but when I want to edit that content or other content the editor does not load.
I have uninstalled the CKEDitor and re-installed and reassigned it to the text format. Did not help
I cleared my cache in case javascript files were cached. Did not help.So I'm stuck and hope someone can help.
#3294720: The attachBehaviors() for document is only called after Big Pipe chunks are processed
#3467860: Ensure consistent ordering when calculating library asset order
Steps to reproduce
Given that a Drupal 10 site was installed with the minimal profile ( not the standard profile )
And later on the BigPipe and CKEditor5, Tour modules were installed
Then the wight of the BigPipeJavaScript
library will affect the CKEditor 5, Tour, Maybe other modules.
Big Pipe is attempting to attach behaviors too early, and it’s affecting the Tour module as well.
Proposed resolution
- Find a better way to Attach behaviors in Big Pipe
- Add
header: true
to thedrupal/big_pipe
library. - Switch to use a custom domReady in the BigPipe script to let work as Drupal init to Attach behaviors early, if possible without errors
- Suggestion for further improvement: Have advanced config settings for BigPipe:
- Limit to selected themes - Example: only load in the front-end themes.
- Limit by user role - Example: only autonomous users.