- Issue created by @justcaldwell
- πΊπΈUnited States justcaldwell Austin, Texas
I'm attaching a patch with the necessary changes. I'll open an issue branch/MR soon.
I opted to not reintroduce the hard dependency on the CKEditor FakeObjects β module now, but to use these changes you would need to include it in your project:
composer require 'drupal/fakeobjects:^1.2'
As I said above, this is probably a good idea anyway if you're updating from 8.x-2.x, as composer may well remove the module (if it's not required elsewhere) without uninstalling it. FakeObjects can be uninstalled and removed when it's no longer needed.
The patch also corrects broken paths to the CKEditor 4 toolbar icons.
- Merge request !13Allow concurrent use of ckeditor 4 and ckeditor5 β (Open) created by justcaldwell
- πΊπΈUnited States justcaldwell Austin, Texas
MR created as promised π
- Status changed to Needs work
about 18 hours ago 1:45am 14 July 2025 - π¦πΊAustralia marc.groth
Thanks for your work on this @justcaldwell!
Unfortunately I'm able to get this working. After updating (details below) I get the following error in the console (when the page loads; the WYSIWYG is missing completely):
Uncaught ReferenceError: baseStyle is not defined at Object.onLoad (plugin.js?t=szd8cy:22:21) at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.resourceManager.<anonymous> (ckeditor.js?v=4.18.0:255:260) at window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.resourceManager.<anonymous> (ckeditor.js?v=4.18.0:254:32) at n (ckeditor.js?v=4.18.0:248:455) at Array.v (ckeditor.js?v=4.18.0:249:93) at x (ckeditor.js?v=4.18.0:249:177) at ckeditor.js?v=4.18.0:250:131 onLoad @ plugin.js?t=szd8cy:22 (anonymous) @ ckeditor.js?v=4.18.0:255 (anonymous) @ ckeditor.js?v=4.18.0:254 n @ ckeditor.js?v=4.18.0:248 v @ ckeditor.js?v=4.18.0:249 x @ ckeditor.js?v=4.18.0:249 (anonymous) @ ckeditor.js?v=4.18.0:250 setTimeout CKEDITOR.env.ie.d.$.onload @ ckeditor.js?v=4.18.0:250 script window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.element @ ckeditor.js?v=4.18.0:88 p @ ckeditor.js?v=4.18.0:249 load @ ckeditor.js?v=4.18.0:250 load @ ckeditor.js?v=4.18.0:253 l @ ckeditor.js?v=4.18.0:254 (anonymous) @ ckeditor.js?v=4.18.0:255 n @ ckeditor.js?v=4.18.0:266 (anonymous) @ ckeditor.js?v=4.18.0:265 getStylesSet @ ckeditor.js?v=4.18.0:505 g @ ckeditor.js?v=4.18.0:265 (anonymous) @ ckeditor.js?v=4.18.0:265 h @ ckeditor.js?v=4.18.0:247 n @ ckeditor.js?v=4.18.0:248 v @ ckeditor.js?v=4.18.0:249 x @ ckeditor.js?v=4.18.0:249 (anonymous) @ ckeditor.js?v=4.18.0:250 setTimeout CKEDITOR.env.ie.d.$.onload @ ckeditor.js?v=4.18.0:250 script window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.dom.element @ ckeditor.js?v=4.18.0:88 p @ ckeditor.js?v=4.18.0:249 load @ ckeditor.js?v=4.18.0:250 load @ ckeditor.js?v=4.18.0:247 d @ ckeditor.js?v=4.18.0:264 (anonymous) @ ckeditor.js?v=4.18.0:264 f @ ckeditor.js?v=4.18.0:539 loadPart @ ckeditor.js?v=4.18.0:540 c @ ckeditor.js?v=4.18.0:264 (anonymous) @ ckeditor.js?v=4.18.0:264 d @ ckeditor.js?v=4.18.0:10 (anonymous) @ ckeditor.js?v=4.18.0:12 window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fire @ ckeditor.js?v=4.18.0:13 fireOnce @ ckeditor.js?v=4.18.0:12 window.CKEDITOR.window.CKEDITOR.dom.CKEDITOR.editor.CKEDITOR.editor.fireOnce @ ckeditor.js?v=4.18.0:13 m @ ckeditor.js?v=4.18.0:264 (anonymous) @ ckeditor.js?v=4.18.0:260 (anonymous) @ ckeditor.js?v=4.18.0:28 setTimeout setTimeout @ ckeditor.js?v=4.18.0:28 b @ ckeditor.js?v=4.18.0:260 b @ ckeditor.js?v=4.18.0:346 CKEDITOR.replace @ ckeditor.js?v=4.18.0:351 attach @ ckeditor.js?v=10.4.6:20 Drupal.editorAttach @ editor.js?v=10.4.6:304 (anonymous) @ editor.js?v=10.4.6:228 attach @ editor.js?v=10.4.6:211 (anonymous) @ drupal.js?v=10.4.6:166 Drupal.attachBehaviors @ drupal.js?v=10.4.6:162 (anonymous) @ drupal.init.js?v=10.4.6:32 listener @ drupal.init.js?v=10.4.6:20Understand this error
It looks like the issue is in the anchor_link module js itself (/modules/contrib/anchor_link/js/unlink/plugin.js which references baseStyles which apparently no longer exists). It's also referenced in /modules/contrib/anchor_link/js/link/plugin.js
My setup is as follows:
Drupal: 10.4.6
Anchor Link: 3.0.3 (with #3484756 and #3399656 patches applied)
Fake Objects: 2.0.1FWIW: Removing those references seems to fix the issue. Am I missing something or should the patch be updated to include these removals?
- π¦πΊAustralia marc.groth
Attached is an updated patch that includes these removals. The MR on drupalcode will need to be updated to include these changes if this is the correct approach...
- π¦πΊAustralia marc.groth
Sorry, for some reason that patch file was not created correctly. Attached is a version that should.