Problem/Motivation
The CKEditor 4 module must be removed from Drupal 10 and hence should be deprecated in 9.5.
Steps to reproduce
N/A
Proposed resolution
Deprecate after all other issues in #3270437: [meta] Tasks to deprecate the CKEditor 4 module are done.
- ✅
Create a section on Deprecated and obsolete modules and themes to provide recommendations for sites using module MODULE_NAME. The recommendation are to include instructions for sites using MODULE_NAME and for contributed modules that depend on MODULE_NAME.https://www.drupal.org/node/3223395#s-ckeditor - ✅
Set lifecycle to deprecated.https://git.drupalcode.org/issue/drupal-3304326/-/commit/2fcdbd4ddb29618... - ✅
Set lifecylcle_link to the section added above, https://www.drupal.org/node//3223395#s-MODULE_NAME.https://git.drupalcode.org/issue/drupal-3304326/-/commit/2fcdbd4ddb29618... - ✅
Add @group legacy to the tests in the module.https://git.drupalcode.org/issue/drupal-3304326/-/commit/908e066080c9807... - ✅
The change record for this issue includes a link to the doc page.
Remaining tasks
- ✅
Create a section on Deprecated and obsolete modules and themes to provide recommendations for sites using module MODULE_NAME. The recommendation are to include instructions for sites using MODULE_NAME and for contributed modules that depend on MODULE_NAME.https://www.drupal.org/node/3223395#s-ckeditor - ✅
Set lifecycle to deprecated.https://git.drupalcode.org/issue/drupal-3304326/-/commit/2fcdbd4ddb29618... - ✅
Set lifecylcle_link to the section added above, https://www.drupal.org/node//3223395#s-MODULE_NAME.https://git.drupalcode.org/issue/drupal-3304326/-/commit/2fcdbd4ddb29618... - ✅
Add @group legacy to the tests in the module.https://git.drupalcode.org/issue/drupal-3304326/-/commit/908e066080c9807... - ✅
The change record for this issue includes a link to the doc page.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
The CKEditor 4 module is deprecated in Drupal 9.5, and will be removed in Drupal 10. An automatic upgrade path will be provided. Alternatively, you will be able to install a Drupal 10-compatible release of https://www.drupal.org/project/ckeditor to stay on CKEditor 4, but this will only be supported for a limited period of time.
Comment | File | Size | Author |
---|---|---|---|
#27 | 3304326-27.patch | 10 KB | Wim Leers |
|
Issue fork drupal-3304326
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
quietone CreditAttribution: quietone at PreviousNext commentedComment #3
quietone CreditAttribution: quietone at PreviousNext commentedAdded the changed record and a stub paragraph on the wiki page.
Comment #4
Wim LeersComment #6
Wim LeersComment #7
Wim LeersUntil #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests is done, we cannot yet mark this module deprecated — after that lands we'll need to mark more tests as
@group legacy
.This is also blocked on #3271097: Replace CKEditor 4 with CKEditor 5 in the Standard profile and StandardTest (not sure if soft- or hard-blocked — in theory the latter, but maybe we can be more pragmatic?)
Comment #8
Wim LeersAnd @quietone already did
😊🥳Comment #9
Wim LeersWhile this could theoretically be reviewed, I think we better hold off on that until #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests is in and this MR has been updated accordingly.
Comment #10
catchTrying to do this in reverse order won't be easier. There are 50 failures in the MR and a lot of them are tests that happen to use the standard profile, so it would mean marking all of them
@group legacy
then having a follow-up to unmark them later. But in the meantime they could mask issues with other module removals, Symfony 6.2 updates, which are ongoing.As far as I can tell we are down to one actual Drupal blocker to marking ckeditor5 stable (the image insert URL one) + five accessibility issues of which around half are fixed in the next cke5 release. So if we can get that image insert issue done + update to the ckeditor5 release due in a week, we're down to two in-progress upstream issues which are likely to require zero Drupal changes apart from a dependency update.
Given that I think there are two options that are easier and would probably be OK:
1. Put ckeditor5 into the standard profile before it's marked stable.
2. Mark ckeditor5 stable with the couple of upstream accessibility issues outstanding, on the basis that they'll be fixed before rc.
I don't know if #1 would also run into test failures, #2 would just be a decision we have to make.
But either way, we'd then be able to complete the ckeditor4 deprecation and removal cleanly in time for beta, without introducing workarounds we have to undo later, on the basis that the last stable blockers will be fixed before rc. Also the fact that the bugs were identified in good time is many times better than if we'd identified them after already marking it stable.
We haven't done this before with an experimental module but we've also never had one where the last remaining blockers were on an upstream team we were in close contact with, so I think it would be OK. It's also not adding any new release blocking technical debt since the release is already blocked on it.
Comment #11
Wim LeersWow, indeed! I had not realized previously what a chicken & egg situation we were in 🐣.
Indeed, until the CKEditor 5 module is marked stable and used in the Standard install profile, we won't be able to do this issue.
That does still mean that this issue is postponed on #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests though→ NOPE! That would solve only a handful of the 50 test failures.So this just means that we should prioritize #3271097: Replace CKEditor 4 with CKEditor 5 in the Standard profile and StandardTest to land ASAP, since that's the only remaining blocker here 👍 Posted something to that effect over at #3271097-16: Replace CKEditor 4 with CKEditor 5 in the Standard profile and StandardTest.
Comment #12
catchHeh, now multiply that by quickedit, bartik, seven, stable, forum, aggregator, HAL ;)
Pretty sure we'll need both #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests and [#14663486] to happen before we're able to do this one.
We'll also need to replace ckeditor with ckeditor5 in the 9.4.0 database dumps in Drupal 10.1.0. I'm not 100% tests of those will start failing when ckeditor is marked deprecated, but they definitely will when we actually remove it in Drupal 10, and we've been trying to commit the deprecation and removal patches somewhat close to each other since it's the removal patch that really proves the removal is clean, as we've found out multiple times to our cost already.
But hopefully this'll be quite minimal after that (just marking any ckeditor4-only tests @group legacy which should all be in ckeditor module + .info.yml file changes.
Comment #13
Wim LeersI don't understand this — seems like that should be the
10.0.0
database dumps? Since 9.4.0 definitely did not install CKEditor 5 by default?Comment #14
catch@Wim Leers currently the 9.4.0 database dump, which is in Drupal 10, contains ckeditor, which means when you test updates to Drupal 10, ckeditor is installed.
If we remove ckeditor from Drupal 10, but don't remove it from the 9.4.0 database dumps, those tests will fail due to the ckeditor module being missing from the filesystem - so we have to remove it from the dumps in 10.0.x
Simultaneously, we're adding ckeditor5 to the standard profile in 9.5.0, but if we want the standard upgrade path tests to run with ckeditor5 installed, we'll need to add it to the database dumps used for tests - currently we only have 9.4.0 database dumps, none for 9.5.0 or 10.0.0 (and might not add those until just before Drupal 11, certainly can't add them before 9.5.0 is released anyway).
More or less we need to replicate what we're expecting real sites to do, which is install ckeditor4 and uninstall ckeditor5.
Comment #15
Wim LeersCorrect me if I'm wrong, but … isn't #3304736: Provide a good UX to ensure the CKEditor 4 to 5 update is always done before upgrading to Drupal 10 unless the contrib module is installed supposed to take care of that? Actually, @longwave spotted the fact that that did not work, and I fixed it in #3304736-14: Provide a good UX to ensure the CKEditor 4 to 5 update is always done before upgrading to Drupal 10 unless the contrib module is installed. 👍
Agreed! But I'd expect us to create new
9.5.0
dumps instead, instead of pretending CKEditor 5 was stable and the default in 9.4.0 — that's all I'm saying! So confuses me 😅 Why exactly won't we add those until just before Drupal 11? 🤔Comment #16
catchJust added comments on #3304736: Provide a good UX to ensure the CKEditor 4 to 5 update is always done before upgrading to Drupal 10 unless the contrib module is installed - first I've seen of that issue and so far I don't think we should be trying to do it at all.
We need to test the upgrade path from 9.4.0 (actually 9.4.4 for sites with ckeditor installed and this is what the dumps use in reality) to Drupal 10.0.0 and eventually to Drupal 10.LAST.0 - so the only options are for that dump to have ckeditor5 in it, or to uninstall ckeditor4 and have all the generic upgrade paths without either module installed, unless we add the stub which I don't think we should.
Comment #17
Wim Leers#3271097: Replace CKEditor 4 with CKEditor 5 in the Standard profile and StandardTest is in.
Comment #18
Wim LeersAwaiting results of rebasing now that #3271097: Replace CKEditor 4 with CKEditor 5 in the Standard profile and StandardTest is in. Spot-checked locally (and that's how I noticed I forgot to mark 3 tests as
@group legacy
😅), it should pass tests now 👍Comment #19
longwaveAlmost there - looks like this needs #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests to land first.
Comment #20
Wim LeersIndeed!
I wrote that in #11 but was thinking/hoping that this would actually cover everything. Still, from 50 to 12 thanks to that one blocker being in is not bad 😄
We'll need to update
\Drupal\Tests\system\Functional\Common\NoJavaScriptAnonymousTest
here still, but that should be easy.Almost there…
Comment #22
lauriii#3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests has landed.
Comment #23
longwaveFixed the two remaining test failures, this run should be green.
Comment #24
Wim LeersI think this is RTBC, but self-RTBC is really inappropriate in this case 🤓
Comment #25
quietone CreditAttribution: quietone at PreviousNext commentedI reviewed the MR and CKEditor 4 is deprecated and that tests are changed as needed.
Reviewing the comments I see that #12 has not been addressed. Setting to NW for that to be resolved.
Comment #26
Wim LeersHm … but in comments after #12 I explained why I'm not sure that's a good idea. It reflects a world of 9.4 that does not match reality.
Can we do the DB dump updating in a separate issue? Because whether we do that depends on the outcome of #3304736: Provide a good UX to ensure the CKEditor 4 to 5 update is always done before upgrading to Drupal 10 unless the contrib module is installed.
Created #3306545: Replace ckeditor with ckeditor5 in the 9.4.x database dumps in Drupal 10.0.x & 10.1.x to ensure that step is not forgotten 👍
Comment #27
Wim LeersThat being said, we should of course make sure that committing this will still allow tests to pass in D10, per @catch's #12, where he said
.So, converting the MR to a patch to test it against all three branches it would be committed too.
Comment #28
Wim LeersYay — all green! 😊
That means we can do this first, and then do #3306545: Replace ckeditor with ckeditor5 in the 9.4.x database dumps in Drupal 10.0.x & 10.1.x later! 👍
Comment #29
phenaproximaThe merge request looks good from a code perspective. The change record looks good too; I updated it to fix a bad link.
The only question I had was concerning CKEditor's API -- there's a whole plugin type it provides, and two test traits. I don't see explicit deprecations for those. I raised that to Wim and he pointed out that Quick Edit also has similar APIs that are not explicitly deprecated. Our assumption is that the fact that the module is deprecated as a whole covers it from a governance perspective, and any tests which enable the deprecated module will generate errors.
So assuming we're right about that, I don't see any reason to block this.
Comment #30
catchGood plan to sort out the dumps in #3306545: Replace ckeditor with ckeditor5 in the 9.4.x database dumps in Drupal 10.0.x & 10.1.x, and good that we don't need to update any upgrade tests to @group legacy (although would expect the removal patch itself to fail hard, unless we don't have ckeditor in the main dumps at all).
We haven't been deprecating APIs within deprecated modules because the contrib version of the module won't have those deprecations - i.e. it's not the API that we're deprecating but the fact that the module is in core.
Comment #31
Wim LeersYay, thanks for #30, that's really helpful! 😊
P.S.: I think you want #3270438: Remove CKEditor 4 from core to be green prior to committing this, right? But before we do that, we need to get https://www.drupal.org/project/ckeditor/releases/1.0.0 out, right? Currently working on that in #3306630: Split the core 9.5.x ckeditor history into a new 1.0.x branch and cut a 1.0.0 release 🤓 I won't be able to finish that today, but should manage to wrap that up tomorrow.
Comment #32
Wim LeersQuestion: shouldn't we also deprecate the
core/ckeditor
asset library in here? 🤓Comment #33
xjmYep, that's the current practice for module removals. It also helps with e.g. grep to make sure all the necessary deprecations are covered. Which is related to...
Yes. Do we also need a blocking issue to move the asset library into CKEditor's own namespace? NW for that.
Comment #34
Wim LeersIMHO we should simply deprecate the
core/ckeditor
asset library.100% of sites still using CKEditor 4 will have https://www.drupal.org/project/ckeditor installed, and hence that contrib module will be able to provide a smooth transition (being worked on right now in #3306630-20: Split the core 9.5.x ckeditor history into a new 1.0.x branch and cut a 1.0.0 release).
Just pushed https://git.drupalcode.org/project/drupal/-/merge_requests/2657/diffs?co... that does that.
Comment #35
Wim LeersDiscussed this with @xjm yesterday. She agrees with #34.
Comment #36
Wim Leers#3306712: Update NoJavaScriptAnonymousTest to use Standard profile instead of listing modules conflicted with this … but it'll also make this simpler 👍 Updating the MR.
Comment #37
Wim LeersJust updated the parent/meta's remaining tasks at #3270437: [meta] Tasks to deprecate the CKEditor 4 module, to make it easier to understand why this is not yet seeing more activity 🤓
Comment #38
Wim Leers#3307186: Mark CKEditor 5 stable was just committed … so I think this is as unblocked as it can be 🤓
Comment #39
lauriiiReviewed the MR, the release note and the CR and all of them look good for me except one change which I was surprised to see in the MR. I don't think that should block this issue since I don't think it's related to this issue. I think this is ready to be committed to unblock #3270438: Remove CKEditor 4 from core which is also RTBC! 🎉
Comment #41
catchCommitted/pushed to 9.5.x, thanks!