Problem/Motivation
After upgrading to Drupal 11.2, this module stopped working.
ckeditor5-dll.js?v=45.2.0:5 Uncaught CKEditorError: Cannot read properties of undefined (reading 'viewUid')
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#erro... read properties of undefined (reading 'viewUid')
at i._remove (ckeditor5-dll.js?v=45.2.0:5:667561)
at i.remove (ckeditor5-dll.js?v=45.2.0:5:665460)
at i.remove (ckeditor5-dll.js?v=45.2.0:5:631088)
at editorAdvancedLink.js?v=11.2.0:1:11195
at Array.forEach ()
at h._addGroupsToFormView (editorAdvancedLink.js?v=11.2.0:1:11167)
at C. (editorAdvancedLink.js?v=11.2.0:1:10076)
at C.fire (ckeditor5-dll.js?v=45.2.0:5:639290)
at C.set [as visibleView] (ckeditor5-dll.js?v=45.2.0:5:641653)
at C._showView (ckeditor5-dll.js?v=45.2.0:5:607964)
When using it, the links don't properly fill the information and you get a javascript console error
Steps to reproduce
* Have a Drupal 11.2 site with the module enabled.
* Try to create links.
* Update existing links with custom CSS classes (text format config).
| Comment | File | Size | Author |
|---|---|---|---|
| #47 | replace_link.mp4 | 1.13 MB | selinav |
| #44 | overlay_2.3.0.png | 41.48 KB | bsanders44 |
| #44 | overlay_2.2.7.png | 20.43 KB | bsanders44 |
| #34 | editor_advanced_link--2025-06-30--3531194--mr-35--for-02-02-06.patch | 24 KB | rajab natshah |
| #25 | ckeditor-editor-advanced-link-styling-fix.png | 21.83 KB | mradcliffe |
Issue fork editor_advanced_link-3531194
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
alexgreyhead commentedAlso started seeing this after update last night on D10.5.0 :-/
Clicking the link button on the editor toolbar triggers the console error for new and existing links.
A
Comment #3
mark_fullmerThis is due to an API-breaking change in CKEditor 45. The report and fix for the Linkit module may provide a good roadmap for the fix here: #3522476: Compatibility fix for v45 of CKEditor5
Comment #4
sirclickalotJust to add that we are seeing exactly the same symptom with identical Drupal version update 10.47 > 10.50 - Editor Advanced Link dialogue layout is broken and the same JS errors in the Console.
Comment #5
alexpottThis is a critical bug :)
Comment #6
alexpottTagging this issue appropriately as it happens on both 10.5 and 11.2
Comment #7
steva1982 commentedWith D10.5, after updating "Linkit " from 7.04 to 7.05, the dialogue layout in CKEditor doesn't work, it is impossible to find everything.
Disabling "Editor Advanced link" (version 2.2.6), the dialogue layout comes back working...
Comment #8
alexgreyhead commentedOn my build at least, for any version of Drupal core >=10.2.0, the CKEditor link button is completely non-functional, even with Linkit and Editor Advanced Link disabled, database updates run, and caches cleared.
Additionally, there are no console errors triggered by clicking the button.
Reverting back to core 10.1.x fixes the issue.
Not sure how to fix this one... :-/
A
Comment #9
nicxvan commentedWhat other ckeditor modules do you have installed?
Comment #10
mradcliffeI am only using Editor Advanced Link and run into this issue on 11.2.0.
The buttons here are now an array of
undefinedso potentially ck-button-save and ck-button-cancel no longer are found at that point in time.I don't know if adding
buttons.filter(e => undefined !== e).forEachwould simply mask the issue.Comment #11
alexgreyhead commented@nicxvan - me? No other CKEditor modules.
Seems it _might_ be related to modals - specifically Entity Reference with Layout (Paragraphs) modals.
Comment #12
mradcliffeThe buttons are not direct children of linkFormView, but seem to be one level deeper.
.ck-form__row_with-submit button.ck-button-actionwhich is used for Update and Insert button labels.ck-button-save and ck-button-cancel classes were removed in CKEditor 45 as part of 17230: Improved linking experience.
So adding another item to that array maybe?
That's looking kind of ugly, so maybe cleaning it up so it's not in the array instantiation?
Comment #13
mradcliffeBut then _manualDecoratorSwitches is undefined later on. Whatever that means.
Comment #14
mark_fullmerFrom notes in #3522476: Compatibility fix for v45 of CKEditor5:
See the CKEditor5 LinkCommand docs for more details: https://ckeditor.com/docs/ckeditor5/latest/api/module_link_linkcommand-L...
The pertinent change in Linkit, which may be a model for the needed change in Editor Advanced Link, is here: https://git.drupalcode.org/project/linkit/-/merge_requests/96/diffs?comm...
Comment #15
mradcliffeAs far as I can tell, I don't think the linkit change would apply here.
I think the entire formView changes need to be redone to comply with link properties.
Edit: Maybe changing to use propertyView and refactoring out some of the HTML changes?
Comment #16
mradcliffeOkay, I understand the change in linkit @mark_fullmer mentioned a bit more now, which is necessary for saving the form values. The button and target changes would also need to be made to get things functional.
Comment #18
mradcliffeThere's a start that gets things mostly functional again.
Comment #19
anybodyFor me it's
, but I think same root cause.
Comment #20
fl-49 commentedSorry, I'm realizing my comment here is not adding anything new, and is not helpful. But I can't delete it. I look forward to a patch or an update from your great work.
I think this is the same issue:
I have updated to core 10.5, which includes the CKE5 update to v45. And I've updated Linkit to 7.0.5. I get an error when adding or editing a link. In console, I see:
ckeditor5-dll.js?v=45.2.0:5 Uncaught CKEditorError: Cannot read properties of undefined (reading '_items')I am able to add a link. And when I edit an existing link I can enter a link and save it. But when I edit an existing link it does not initially show the link that was there. I can only enter a new link.
Also, I have Linkit configured to add media links. But that is not working at all. The url field only accepts hard links.
Here's more of the js stack trace in console:
When I disable the Editor Advanced Link module, all Linkit functions work as they should, but the features this module provides need to be added to the a tag manually.
Comment #21
netsliverHi, the attached patch fix this error
Comment #22
mradcliffeThank you, @netsliver. Can you review the existing merge request and/or create a merge request with the source javascript changes in addition to the built javascript? It is hard to review the changes in the obfuscated built javascript.
The main changes in #21 based on an expanded diff (attached) are the following. If the _getGroup and _createExtraFormFields changes are necessary, then I think those can be applied to the merge request in source and built versions.
I think the other changes are basically equivalent to the changes in the merge request and probably has the same issues in the merge request that need to be addressed. The submit changes to check the keys may be a good thing to add as well.
_handleExtraFormFieldSubmit: only handles the new ckeditor args (not compatible with older release, so would require a version bump). It also changes the mapping of keys.
The _manualDecoratorSwitches error is resloved by checking if that exists. This is in the merge request.
Changes the button finding logic in _addGroupsToFormView
Changes the _getGroup method logic. Is this necessary?
There's a change when adding children in _createExtraFormFields that removes a condition. Not sure why.
Comment #23
mradcliffeSome screenshots of old vs new:
Old
New
Merge request

Patch in #21

In order to resolve the look and feel,
the extra form fields should be added as ckeditor form rows, or maybe adding a class selector
ck-form__row_large-top-paddingto each extra field. The title field being outside of advanced probably just needs to become a ckeditor form row.Then the focus order needs to be fixed.
And probably some @deprecated comments added to styles that no longer apply.
Comment #24
alexgreyhead commentedI feel this question needs to be asked; is there a way to pin CKEditor to the old version, please?
It seems like this bug is causing a great deal of unnecessary headaches for production sites which had no warning of this breaking change, and there seems to be virtually no benefit to having this update forced upon us.
Would anyone happen to know if there's something we can set in our composer.json, or a way we can patch core, to require the old CKEditor version to stop this issue and guard against this happening again in future?
(-:
/A
Comment #25
mradcliffeI was not able to use FormRowView for backwards-compatibility. Instead I added a class selector to fix the styles.
Focus order still needs to be addressed. I have not been able to figure that out. Hopefully someone can update the merge request to fix focus order in a way that is backwards-compatible.
Comment #26
mark_fullmerWould it be sufficient to pin Drupal core to 11.1.x or 10.4.x?
Comment #27
alexgreyhead commented> Would it be sufficient to pin Drupal core to 11.1.x or 10.4.x?
If that would fix the issue, then absolutely, yes - I'll give this a go tomorrow.
Thank you for the steer, Mark (-:
/A
Comment #28
nicxvan commentedIf you've deployed this to production I would strongly recommend not downgrading.
If you've not deployed to production then waiting is an option.
Comment #29
mradcliffeFocus order has its own issue #3519379: Fix keyboard accessibility of advanced attribute fields.
Two behavior changes:
fieldParent.children.add(extraFieldView, fieldParent === linkFormView ? 1 : 0). Maybe this can be fixed or addressed later if it is a problem?Comment #30
snowcoder commentedThere seems to be an error with the MR. When I try to apply it and run a composer update, it tells me it can't apply the patch. Anyone know why?
Comment #31
mradcliffeThe merge request applies to 2.2.x branch (2025.04.15), not to the 2.2.6 release (2024.08.09) which is several commits behind.
Comment #32
alexgreyhead commented@nicxvan Thank you for the word of caution :-) It turns out this issue was compounded by Entity Reference Layout's modal CKEditors being broken in every version of Drupal >= 10.2; we jumped from 10.1 to 10.5, which muddied the waters somewhat.
In our case, thankfully, only one site had been moved from 10.1 and we were able to re-deploy 10.1 underneath the 10.5 database with only a serialisation error in Metatags on a handful of pages which was resolved by re-saving the node.
I will test the MR + D10.5 on some of our sites over the weekend; hopefully it fixes this mess :-( Many thanks @mradcliffe and everyone else who's working on a fix - this is not an area of code I've ever worked on so am unable to contribute, sadly.
/A
Comment #33
rajab natshahFacing the same issue with CI Automated Functional Testing and normal use.
Comment #34
rajab natshahAttached a static
editor_advanced_link--2025-06-30--3531194--mr-35--for-02-02-06.patchfile, to this point of MR35, but with re-role changes to work with 2.2.6To be used with editor_advanced_link-2.2.6 and Composer Patches
Comment #35
jannakha commented#MR35 and #34 fixed the console error - thank you!
please push to stable release
Comment #36
vladimirausAlso, see the following patches for another modules with similar issue.
Comment #37
vladimirausComment #39
vladimirausThanks all! 🧁
Committed!
Comment #40
lindsay.wils commentedIGNORE THIS, its under 'Link Properties' button. Interesting choice of a change to the UI
Thanks everyone for all the quick work.
I have just upgraded and there are no more errors, but the 'Open in a new window' checkbox is not showing, even though it is setup to show for the text format.
In my format settings under Advanced links, I have both ID and target checked, but only ID is showing.
ID ()
Open in new window ()
Ive also tested adding other options, like 'CSS classes ()' which also appears fine.
Anyone else seeing this?
Comment #41
snowcoder commentedI still seem to be getting this error, even after updating the module. The weird thing is it works fine in my Pantheon dev/test sites, however, production is where it seems to break still. The autocomplete doesn't work and the console error, mentioned in this issue persists. I thought it may have been a cache thing, but I've cleared it all multiple times. Any suggestions to get it working in production?
Comment #42
vladimiraus@snowcoder - for some sites I have to un-aggregate CSS and JS and then turn it back on.
Don't forget, there are multiple modules affected. See #36 for other links plus I'm seeing reports of IMCE errors as of this morning.
Comment #43
rajab natshahThanks, Vladimir, for the new smart switch of the mechanism to have a smoother update process.
Comment #44
bsanders44 commentedI updated to the newest core (10.5.1) and Editor Advanced Link (2.3.0). However, although some aspects of the module overlay now work, the button to browse and link to files on the server is still missing. If I revert to Core 10.4.8 and version 2.2.7, the button comes back. See screenshots.
Comment #45
marieascomedia commentedthe fact IME button does not display is not an Editor advanced link problem.
In fact, the button is hidden behind the new insert button.
Here is the ticket I have opend on IMCE https://www.drupal.org/project/imce/issues/3532569
Comment #46
vladimirausThanks @marieascomedia and @rajab natshah.
@bsanders44: hopefully #45 answers your question.
Comment #47
selinav commentedI updated to the newest core (10.5.1) and Editor Advanced Link (2.3.0). However, when I replace link, it doesn't work. It keeps the last link.
When I try to add new link and I submit, the link is not taken in consideration.
I use also Linkit 6.1.6 module for autocomplete.
[EDIT] After upgrade to 7.0.5, it well works
Comment #48
agoradesign commentedThen the version of your linkit module would be interesting too, I guess ;-)
Comment #49
vladimirausWhoever comes here next, please check comment #36 first and the following two links containing other broken CKEditor modules:
Comment #50
eduardo morales albertiWhy the module is not compatible with 11.1.X on version 2.3.0/2.2.7?
Comment #51
rajab natshah2.3.0 was released 30 June 2025
Works with Drupal:
^10.5 || ^11.2Support for CKEditor 45+ (Drupal 10.5+ / 11.2+).
2.2.7 was released 30 June 2025
Works with Drupal:
^10.2 || ^11.0Support for CKEditor 44 and earlier.
Maybe
^10.2 || ^11.0could be changed to<=10.4 || <=11.1as
^11.0may let the module bring 2.2.7 under Drupal~11.2.0Comment #52
kmontyConfirming comment #51. If you are Core 11.1.x, you cannot install either 2.2.7 or 2.3.0.
Comment #53
vladimiraus@eduardo morales alberti : 2.3.x supports only CKEditor 45.2+ which is available on Drupal 11.2+. Read the comments above.
Comment #54
vladimirausGood point @rajab natshah. I'll update the code.
What @kmonty pointed out is also correct. 2.2.7 is not installable on Drupal core. 11.1.x
Opened the regression here: #3534582: Regression: 2.2.7 is not installable on Drupal core. 11.1.x
Comment #55
eduardo morales albertiMy comment was incomplete; we were trying to update the module from 11.1.8, and we were stuck on 2.2.6.
Comment #58
flyke commentedWhat could be causing me having the same error on Drupal 11.2.2 with editor_advanced_link (both 2.3.1 and 2.3.x-dev) ?
Is it the same cause as #3531259 from the ckeditor_abbreviation module ? It seems thay had similar issue because of the upgrade to CKEditor 45.2.0 ?
Comment #60
rcodina@flyke I also reproduce the problem with 2.3.1 but with 2.3.x-dev from 24 Sep 2025 it now works like a charm!!! So it would be nice that someone tags a new 2.3.2 release.