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.
Comments
Comment #2
megan_m commentedComment #3
megan_m commentedComment #4
ckhaliloI got the same error when i migrate to Drupal 10.3

Comment #11
marieascomedia commentedWorks for me.
Thank you.
Comment #12
ded commentedWe are having this issue also with 3.0.0-beta1. Our console error is slightly different:
Comment #13
lazzyvn commentedI have same error with drupal 10.3
Comment #14
earthday47I can also confirm that the merge request resolves the issue!
This seems to be a common issue with plugins, such as https://www.drupal.org/project/ckeditor_bs_grid/issues/3389827, and checking for the existence of the object is the resolution.
Comment #15
joelpittetThe input field is empty when this error is happening, Major if not critical so bumping the Priority.
Comment #16
aporie+1 RTBC
Comment #17
shani mauryaI can also confirm that the merge request resolves the issue for D10.3
Comment #18
donpas commentedMade a patch for those still facing this issue with version 3.0.x.
Comment #19
donpas commentedComment #20
aporieHi Donpas,
There is a MR available. You can find the patch by clicking on "plain diff".
Comment #21
carlosmonroy commentedhello,
We encountered the same problem when updating core 10.3.
we had ckeditor_iframe in alpha1
By updating ckeditor_iframe and using the patch in comment #18, ckeditor works again.
Comment #22
caspervoogt commentedPatch from #18 works for me.. RTBC IMHO
Comment #23
vanessa.fayard commentedI've applied the MR!9 as patch and it applied successfully with no errors.
Tested on Drupal 10.3.2 with drupal/ckeditor_iframe: ^3.0@beta
Thanks
Comment #24
ccarnnia commented++ #23
applied the patch to D10.3.5 successfuly.
Comment #25
bkosborneSorry all, I'll get a new release out today for this.
Comment #26
bkosborneComment #28
bkosborneComment #29
bkosborneIncluded in 3.0.0-beta2