Steps to reproduce
- Login as Admin and enable Realtime editing from Administration
- Go to a page
- Click "Comment" button
- Observe the JS console logs
- Add a comment
- Add a second comment
- Observe the JS console logs
Expected results Not errors are displayed. The comments are added without any issues. Actual results On Step 4, after clicking the "Comment" button, a JS error is displayed;
wysiwygEditor.js:65 Uncaught TypeError: Cannot read properties of undefined (reading 'channels')
at new z (wysiwygEditor.js:65:39)
at plugin.js:315:30
at Object.execCb (require.min.js?r=1:5:16727)
at e.check (require.min.js?r=1:5:10499)
at e.<anonymous> (require.min.js?r=1:5:12915)
at require.min.js?r=1:5:1542
at require.min.js?r=1:5:13376
at each (require.min.js?r=1:5:1020)
at e.emit (require.min.js?r=1:5:13344)
at e.check (require.min.js?r=1:5:11058)
Then, after adding a comment, the following one is not added. A red error box is displayed on the browser below footer each time the "Add comment" button is clicked:
The content cannot be saved because of a CKEditor internal error. You should try to copy your important changes and reload the editor.
And some errors displayed in JS console:
ckeditor.js:458 Uncaught TypeError: Cannot read properties of undefined (reading 'getSelection')
at CKEDITOR.dom.selection.getNative (ckeditor.js:458:125)
at new CKEDITOR.dom.selection (ckeditor.js:456:179)
at CKEDITOR.editor.getSelection (ckeditor.js:453:347)
at e.<anonymous> (plugin.js:270:28)
at e.l (ckeditor.js:10:246)
at e.<anonymous> (ckeditor.js:12:91)
at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire (ckeditor.js:13:285)
at e.getData (ckeditor.js:275:166)
at e.k (ckeditor.js:1312:64)
at e.l (ckeditor.js:10:246)
ckeditor.js:701 Uncaught TypeError: Cannot read properties of null (reading 'getClientRect')
at k._layout (ckeditor.js:701:45)
at k.add (ckeditor.js:697:363)
at e.show (ckeditor.js:692:184)
at e.showNotification (ckeditor.js:691:420)
at Object.updateContent (plugin.js:133:16)
at Object.<anonymous> (plugin.js:116:75)
at Array.forEach (<anonymous>)
at Object.updateFormFields (plugin.js:115:20)
at Object.<anonymous> (plugin.js:60:19)
at HTMLDocument.dispatch (jquery.min.js?r=1:2:40035)
ckeditor.js:701 Uncaught TypeError: Cannot read properties of null (reading 'getClientRect')
at k._layout (ckeditor.js:701:45)
at e._output (ckeditor.js:30:77)
at e._call (ckeditor.js:50:419)
at f (ckeditor.js:20:287)
at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.window.input (ckeditor.js:20:447)
at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.window.l (ckeditor.js:10:246)
at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.window.fire (ckeditor.js:12:91)
at ckeditor.js:65:66
As the full stacktraces could not be copied directly from JS console, please find attached the saved logs for each error. The issue reproduces also on XWiki 15.10.11, 16.4.1 and 16.5.0. |