Closed (outdated)
Project:
Drupal core
Version:
11.x-dev
Component:
media system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Feb 2021 at 19:00 UTC
Updated:
24 Oct 2025 at 15:24 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
ebremner commentedAdding patch to fix.
https://www.drupal.org/files/issues/2021-02-02/3196146-media-undefined-e...
Comment #3
inteeka-help commentedHi there,
We are also having this issue, we have created a new Plugin module for "imagetoolbar", it works initially on page load, but once you open an IEF (Inline Entity Form), it goes blank, we also receive a JS error.
JS ERROR:
Uncaught TypeError: Cannot read property 'on' of undefined
at Object.beforeInit (plugin.js?t=qqqsi5:189)
at Object. (ckeditor.js?v=4.15.1:273)
at n (ckeditor.js?v=4.15.1:253)
at Object.load (ckeditor.js?v=4.15.1:253)
at ckeditor.js?v=4.15.1:273
at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.resourceManager. (ckeditor.js?v=4.15.1:260)
at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.resourceManager. (ckeditor.js?v=4.15.1:259)
at n (ckeditor.js?v=4.15.1:253)
at Object.load (ckeditor.js?v=4.15.1:253)
at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.resourceManager.load (ckeditor.js?v=4.15.1:258)
Line 189: editor.widgets.on('instanceCreated', function (event) {
plugin.js in question is: drupalimage located in core/modules/ckeditor/js/plugins/drupalimage/plugin.js which is triggered
Our Plugin sourcecode:
Our Drupal environment:
Drupal Core: 9.1.4
PHP: 7.4
CKEditor: 4.15.1
Inline Entity Form Version: 8.x.1.0-rc8
How to produce:
- Install IEF.
- Create a new custom plugin on any CKEditor that uses drupalimage plugin.
- Enable this on the editor settings.
- Create a entity reference within a content type with unlimited cardinality.
- Set Form display to IEF (Complex).
Comment #4
liam morlandIf this is still needed, it will have to be re-rolled against 9.3.x.
It also needs a re-roll to apply after 8.9.19 (which has yet to be merged into 8.9.x).
Comment #5
ebremner commentedRe-rolling for 8.9.19
Comment #6
liam morland8.9.19 has now been merged into 8.9.x. This can be put into an issue fork.
Comment #7
ebremner commentedAdding patch for 9.2.x
Comment #8
liam morlandComment #10
liam morlandThe patch needs to update plugin.es6.js from which plugin.js is generated. See "Drupal core now using ES6 for JavaScript development".
Comment #13
igorbiki commentedUpdated patch for CKEditor4 and Drupal 9.5.x
Comment #14
_utsavsharma commentedFixed CCF for #13.
Comment #16
smustgrave commentedCame up as a daily BSI target
Can anyone confirm this is still an issue in D11?
Comment #17
smustgrave commentedGoing to give 1 more bump before closing.
Comment #18
smustgrave commentedSince there's been no follow up going to close out. If still valid please re-open.