CKEditorError: selection.getFirstPosition() is null after 10.3 update

Created on 25 June 2024, 2 months ago
Updated 3 September 2024, 4 days ago

Problem/Motivation

After the 10.3 update, which upgraded CKEditor from 41.2.0 to 41.3.1, the iFrame button is breaking the editor. The text becomes empty. If I switch between text formats the editor is duplicated (see screenshot). There's a console error:

Uncaught CKEditorError: e.getFirstPosition() is null
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-e.getFirstPosition() is null
    getRelatedElement http://mysite.docker.localhost:8000/modules/contrib/ckeditor_iframe/js/build/iframeembed.js?sfn2ht:1
    getRelatedElement http://mysite.docker.localhost:8000/modules/contrib/ckeditor_iframe/js/build/iframeembed.js?sfn2ht:1
    _updateToolbarsVisibility http://mysite.docker.localhost:8000/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js?v=41.3.1:5
... etc... let me know if more of this would be helpful

I can't replicate this on a clean install of Drupal 10. I can replicate it on another older site that would have been upgraded from CKEditor 4.

This is happening with the 2.x and 3.x versions of this module.

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇨🇦Canada megan_m

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024