- Issue created by @harkonn
- ๐ฉ๐ชGermany sunlix Wesel
Since ckeditor
45.0.0
the icons were moved into its own package@ckeditor5/ckeditor5-icons
Therefore the import has to be adjusted in
abbreviationview.js
From
import { icons } from 'ckeditor5/src/core';
To
import { icons } from 'ckeditor5/src/icons';
But I think this is a breaking change. Maybe we need a new branch with a new drupal core supporting version?
- ๐ฎ๐ณIndia dharmeshbarot Gujarat
Hey @sunlix, I've checked this by applying the changes that you have mentioned but issues is still persist, could you please check again!
- ๐ฎ๐ณIndia Shaikh Sadab
The issue was caused by missing or undefined icon references in the JavaScript build file located at:
`/ckeditor_abbreviation/js/build/abbreviation.js`I modified the file by replacing the undefined icon references with fallback values.
Changes Made:
Line 188
Replaced:
e.icons.check
With:
(e.icons && e.icons.check) || 'Line 194
Replaced:
e.icons.cancel
With:
(e.icons && e.icons.cancel) || 'Line 200
Replaced:
e.icons.eraser
With:
(e.icons && e.icons.eraser) || 'These changes ensure the script does not break when the icon is undefined by falling back to a basic empty `
` element. - Merge request !12Issue #3531259: Incompatible with Drupal Core 10.5 / CKEditor 45 โ (Open) created by sunlix
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
Precise error in console that i was getting with Drupal 11 and CKEditor 45.2:
"TypeError: e.icons is undefined"
Given that the icon package is at play here, that i'm not finding that error message on the internet anywhere, and that CKEditor Abbreviation is the only extra module for CKEditor we have, i think it has to be related.
- ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
The merge request deletes the built file, resulting in an unsurprising error of this kind: The requested URL /modules/contrib/ckeditor_abbreviation/js/build/abbreviation.js was not found on this server.
Given that it was committed before i presume there is a step committers should take to generate the file and then commit it?
And agree that a new major version release makes sense and we can have it version 6 require Drupal core 10.5 / 11.2 or later.
Really rotten of CKEditor to fail this badly on a breaking change; one thing for the plugin or even CKEditor to not work but for it to blank out all text on save is the worst possible behavior.
- ๐ฉ๐ชGermany sunlix Wesel
Sorry for the deleted build artifact. I messed up with the MR because the default branch is 4.0.x and I oversaw the target branch and rebased like a monkey :D
I added the build artifact with the changes, that should running again. But the tests are failing.
Didnt find out the reason. I will dig in later. - ๐ฉ๐ชGermany sunlix Wesel
The current test piplines are running with Drupal
11.1.7
and10.4.7
.
So the tests are running against ckeditor44
and not45
.I added
OPT_IN_TEST_NEXT_MINOR
to test on10.5.0
with ckeditor45
. - ๐ฉ๐ชGermany sunlix Wesel
With ckeditor
45
the tests are green.How to proceed here? Branch a new major and set new version constraint on
5.0.1
?
Or is there a way to support ckeditor44
and45
in parallel? - ๐จ๐ฆCanada mparker17 UTC-4
Maintainer here! Sorry for the delay; it's been a busy few weeks for me.
I have been able to reproduce the problem on Drupal 10.5.0, and can confirm that the code in the patch fixes the issue; but I cannot merge code with broken tests. I also notice some issues in the code: I'll leave some comments in the merge request shortly. For these two reasons I am marking this issue as "Needs Work".
I'll do some more research into compatibility with forward and backward compatibility with Drupal core. There does appear to be some activity in ๐ Update CKEditor 5 to 45.0.0 Active (core), and ๐ D11.2: Uncaught CKEditorError: Cannot read properties of undefined (reading 'viewUid') Active (editor_advanced_link, another module that integrates with CKEditor) to keep an eye on.
While I was updating the issue summary, I tried to find a link to @ckeditor5/ckeditor5-icons in the NPM Package List, but couldn't. @sunlix, do you have a link to this new package?
- ๐ฉ๐ชGermany sunlix Wesel
@mparker17
sure.
NPM: https://www.npmjs.com/package/@ckeditor/ckeditor5-icons
GitHub: https://github.com/ckeditor/ckeditor5/tree/master/packages/ckeditor5-iconsPlease note that this package is new since
45.0.0
ofckeditor5
. - ๐บ๐ธUnited States mlncn Minneapolis, MN, USA
(crosspost)
This is great! Works and the code change is straightforward. I would change to RTBC except for the decision on how to commit and release.
My 2ยข is to do the new major with different version constraintsโ and hope CKEditor does not make a habit of this level of breaking change!
- ๐จ๐ฆCanada mparker17 UTC-4
@sunlix, thanks I've updated the issue summary.
- ๐จ๐ฆCanada mparker17 UTC-4
My multiple version testing results...
In the table below:
- โ means that I was able to see the CKEditor on the node/edit page, I was able to enter an abbreviation using the CKEditor Abbreviation button, and the abbreviation worked on the node/view page
- โ means CKEditor did not load on the node/edit page, and thus I was not able to proceed further with testing. I've listed the error shown in the console (but not the stack trace, in part because my JS was minified)
All four sites were set up identically: Standard install profile; CKEditor Abbreviation added to Basic HTML text format; went to
/node/add/article
to test.... I'll interpret this in another comment; just wanting to save it here.