created this patch just a few changes to the patch mr-63 to allow only edit link in toolbar
Problem/Motivation
Recent changes to the version of CKEditor that ships with Drupal core 10.5/11.2 have caused a broken tooltip for embedded entities such that you can no longer edit them. The following Javascript error is reported in the console:
Uncaught CKEditorError: Cannot read properties of undefined (reading 'pencil')
Read more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-Cannot read properties of undefined (reading 'pencil')
Steps to reproduce
- Find a form using CKEditor configured with entity embed.
- Embed a new entity or edit content with an existing embed.
- Click the embedded entity in the editor
Expected results
The tooltip displays with buttons for edit, Link entity embed, and Edit the embedded entity, eg.

Actual results
Proposed resolution
The tooltip does not show up. There is no option to edit the embedded entity.
Remaining tasks
Comments
Comment #2
ericgsmith commentedComment #3
ericgsmith commentedComment #5
ericgsmith commentedFixed - pretty sure I've got the right link icon. It was removed from the way this plugin was loading it (see https://github.com/ckeditor/ckeditor5/issues/17304) and I saw there was a `IconLink` in the main package now so using that.
Core version req - If we don't bump this then people on 10.4 could update before they go to 10.5 or 11.2 and the plugin it would break for them.
Quick test of the syntax I used:
Comment #6
ericgsmith commentedTests failing - current major still set to 11.1?
Comment #7
ericgsmith commentedComment #8
jayemel commentedThanks for this. Any update when this will be merged and released? It is site breaking for us.
Comment #9
ericgsmith commentedIf somebody can review / test so that it can be moved to RTBC, I'm happy to reach out to maintainers to ask them to get it committed - but I think its fair to wait till the status is RTBC before doing this.
Comment #10
rajab natshahFacing the same issue. thank you for the MR
Comment #11
rajab natshahComment #12
rajab natshahAttached a static
entity_embed--2025-06-30--3531672--mr-62.patchfile, to this point of MR62.To be used with Composer Patches
Comment #13
rford commentedThe patch fixes the issue for me. Thanks!
Comment #14
rajab natshahThanks to Eric for MR62, the patch file is only a static point of the plain diff
Comment #15
tlo405 commentedPatch is working for me as well. Thanks!
Comment #16
jmaguniaThere's a
yarn.lockfile in the MR.Comment #17
jayemel commentedWhen will the maintainers give this some attention? This essential module is broken on current versions of Drupal.
Comment #18
ericgsmith commentedRe #16 - yes I didn't realise this wasn't already committed. It wasn't present but also isn't it the gitignore so not clear here. It's pretty common to commit the yarn.lock file as it can ensure dependency versions aren't changed until it's intentional
Comment #19
ericgsmith commentedTests are still failing and it's not clear it it's related to this change or not, would be good to get a green pipeline.
Phpunit on previous minor is expected to fail as it's not compatible, but the current job is now testing on 11.2 and there is 2 failures there.
Comment #20
rford commentedI have several sites that are currently unable to be updated to Drupal 10.5 due to this issue. Any updates on when this issue will be resolved?
Comment #21
smustgrave commentedMay have found a valid bug, when you add a link to an embedded entity you can't go back and edit that link. The icon just doesn't work.
Uncaught CKEditorError: r._addActionsView is not a function
Comment #22
smustgrave commentedBelieve I got that correct replacing _addActionsView with _addToolbarView
Comment #23
hamza_niazithis patch mr-62 resolved my issue thanks.
Comment #24
hamza_niazicreated this patch just a few changes to the patch mr-62 to allow only edit link in toolbar
Comment #25
jennypanighetti commentedNot sure what I'm doing wrong, but MR-62 applied via composer (on 10.5.1) did not resolve my issue. I still see no way to edit embedded media items, though at least the white arrow is gone.
Comment #26
ericgsmith commentedThanks @smustgrave!
Confirming your change in d130db37 looks correct as per this change - https://github.com/ckeditor/ckeditor5/commit/4a595753940ab2087db7901922b...
Still have some unexplained test failures here - not really sure I'll have time to dig further into these
Comment #27
ericgsmith commentedOk - did end up trying to investigate these.
The last CI run shows the following tests failing:
I ran these locally on 11.2.2 with same phpunit version. The first 2 pass (with deprecations):
The last one CKEditor5IntegrationTest.php does indeed fail multiple times.
RuntimeException: The autoloader expected class "Drupal\embed\Plugin\CKEditor5Plugin\EmbedCKEditor5PluginBase" to be defined in file "/data/app/modules/contrib/embed/src/Plugin/CKEditor5Plugin/EmbedCKEditor5PluginBase.php". The file was found but the class was not in it, the class name or namespace probably has a typo.Looks like in the embed module that class is using the wrong namespace - it has
Drupal\entity_embed\Plugin\CKEditor5PluginBut this module doesn't appear to be extended that - what even is that class
Comment #28
ericgsmith commentedAdding #3517882: The namespace of EmbedCKEditor5PluginBase does not respect PSR4 as a related issue - that will need to land first for the tests to go green.
Comment #29
m4oliveiThanks for the patch friends!
I had a bit of trouble finding this issue. Making adjustments to the Issue Summary to help other folks find it.
I'm also attaching a patch that leaves out
yarn.lockjust b/c its large, and maintainers haven't piped in yet on whether thats desireable. IMO its a good idea (also noted in #18) for the module going forward, however it might be out of scope and makes the patch big.Comment #30
m4oliveiComment #31
jatingupta40 commentedAs soon as i have updated the Drupal version from 10.4.8 to 10.5.0, i got this same issue.
Patch on #29 resolves the issue.
Thanks.
Comment #32
jatingupta40 commentedIn the newer CKEditor version, the styling and layout of the edit toolbar/balloon have changed.


However, with the applied patch, the toolbar/balloon still appears with the older styling and layout.
We may need to update the MR to align with the new CKEditor styling.
Comment #33
butterwise commentedPatch in #29 worked for me when going from 10.4.8 to 10.5.2. I am now seeing the old toolbar which is better than none.
Comment #34
jatingupta40 commentedComment #35
bkosborneComment #36
bkosborneThis works as expected and restores the original toolbar. RE: #32, I think it's best that be handled in a follow up so we can restore this critical functionality.
Comment #37
liam morlandTests are not passing.
Is it the goal that version 2.0.x will be only for 10.5+ and 11.2+?
Comment #38
trackleft2What would you like to see happen here, @liam.morland?
For my projects, requiring Drupal 10.5+ is fine. Are you suggesting we maintain two release branches? For example:
• 2.0.x – supporting the previous CKEditor in Drupal 10 before 10.5
• 2.1.x – requiring 10.5+
Comment #39
smustgrave commentedProbably going to have and do that as the changes her May break <10.5 or 11.2
Think that’s what the other contrib ckeditor modules had to do unfortunately
Comment #40
ericgsmith commentedComment #43
ericgsmith commentedRe #37 -
tests are also failing on 2.0.x branch for the previous minor which is not affected by the CKeditor version change - I'm not sure how much effort is due here vs a separate issue.Edit, my mistake, I see prev minor actually passes on 2.0.x.Previous minor tests on this branch - well we kind of expect them to fail now, the JS is now dependent on a CKEditor version only available in 10.5 and 11.2 - given 10.6 and 11.3 will be out at some point, it makes sense to keep the tests running on prev minors? Maybe one for the maintainers to give input here.
Other tests - I'm not convinced anything is broken. I already investigated in #27. I added a new branch with the patch committed in #3517882 which was responsible for some of the failures. We can see here with that in place that the tests are passing https://git.drupalcode.org/issue/entity_embed-3531672/-/jobs/6389586 (except for CKEditor5Integration)
A quick win to reduce confusion here would be to please tag a new version of embed so that we can stop being distracted by this unrelated failure.
Then its just the CKEditor5Integration failure to address.
The CKEditor5Integration fails with:
"Test was run in child process and ended unexpectedly"This test passes for me locally - if somebody wants to do battle with gitlab to figure out what / why the pipeline is crashing go for it - but I think I still have confidence the test failure is not related to this change and that the work everybody has done here is good.
Comment #44
liam morlandInstead of two branches, it might be possible to do something like
IconPencil || icons.pencil.The merge request (identical to the patch in #29) is working for us on Drupal 10.5.
Comment #45
finaukaufusiI'm on D10.5.2 - Applied the patch #29 locally using composer and it works on my lando dev. However, when deploy to cloud docker container, it didn't work for some reasons. I inspected the composer install command is running the same as my local. It's blocked me from upgrade to D10.5.2 I have to continue on D10.4.8
Comment #46
finaukaufusiI've use the composer package from this link, it works for me - https://github.com/northernco/ckeditor5-anchor-drupal/pull/17
I have to remove the existing package I used in composer.json and replace with this one.
composer require vardot/ckeditor5-anchor-drupal:~2.0Comment #47
rossb89 commentedMR-62 does the trick to restore the functionality, even if the style of the tooltip is the older style.
Agreed that comment 32 should be handled as a follow up. As it stands, with 10.5+ the ability to edit previously embedded media is completely broken without the changes present here.
If the changes here are only compatible with D10.5+ then a new version should be cut with that as marked compatibility.
Comment #48
jedgar1mx commentedI created a patch using the MR-62 and it seems to do the trick for me.
Comment #49
karenann commentedUpdating comment because of my own error.
I am running 10.6.3 and just attempted to apply mr!62 and it successfully applied. Uploaded the fix and it resolves the issue and the pencil and cog (and link) appear as needed.
Comment #50
divya.lakshman commentedThe Patch on #29 fails to apply on 10.5.6
entity_embed:1.6.0
Comment #51
joseph.olstad@divya.lakshman , please upgrade to entity_embed 1.7.0 , the patch #48 applies to version 1.7.0
Save yourself the trouble and upgrade entity_embed and then patch 48 will apply cleanly.
Comment #52
jannakha commentedApplied patch from MR 62 to v1.7, Drupal 10.6
Works as required (user can modify display mode, layout, link to entity, create link on entity)
Here's screenshots:
screenshot 1
screenshot 2
Note: Linking whole entity doesn't work if entity is rendered with divs and other (which creates invalid html structure). I think there's an issue for it somewhere.
Comment #53
divya.lakshman commentedThanks @joseph.olstad the patch #48 applies to version 1.7.0.
Comment #54
p-neyens commentedI am running 10.6.5 and just attempted to apply mr!62 and it successfully applied. Uploaded the fix and it resolves the issue and the pencil and cog (and link) appear as needed.
Comment #55
mikelutz