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.

  1. 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
  2. Set lifecycle to deprecated. https://git.drupalcode.org/issue/drupal-3304326/-/commit/2fcdbd4ddb29618...
  3. 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...
  4. Add @group legacy to the tests in the module. https://git.drupalcode.org/issue/drupal-3304326/-/commit/908e066080c9807...
  5. The change record for this issue includes a link to the doc page.

Remaining tasks

  1. 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
  2. Set lifecycle to deprecated. https://git.drupalcode.org/issue/drupal-3304326/-/commit/2fcdbd4ddb29618...
  3. 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...
  4. Add @group legacy to the tests in the module. https://git.drupalcode.org/issue/drupal-3304326/-/commit/908e066080c9807...
  5. 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.

Issue fork drupal-3304326

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

quietone’s picture

Issue summary: View changes
Issue tags: +Needs change record
quietone’s picture

Issue tags: -Needs change record

Added the changed record and a stub paragraph on the wiki page.

Wim Leers’s picture

Assigned: Unassigned » Wim Leers

Wim Leers’s picture

Issue summary: View changes
Wim Leers’s picture

Title: Deprecate CKEditor 4 module in 9.5 » [PP-2] Deprecate CKEditor 4 module in 9.5
Assigned: Wim Leers » Unassigned
Status: Active » Needs review

Until #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?)

Wim Leers’s picture

Issue summary: View changes

And @quietone already did The change record for this issue includes a link to the doc page. 😊🥳

Wim Leers’s picture

Status: Needs review » Postponed

While 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.

catch’s picture

This is also blocked on #3271097: [P-2] 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?)

Trying 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.

Wim Leers’s picture

Title: [PP-2] Deprecate CKEditor 4 module in 9.5 » [PP-1] Deprecate CKEditor 4 module in 9.5

Trying 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

Wow, 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.

catch’s picture

Wow, indeed! I had not realized previously what a chicken & egg situation we were in 🐣.

Heh, 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.

Wim Leers’s picture

We'll also need to replace ckeditor with ckeditor5 in the 9.4.0 database dumps in Drupal 10.1.0.

I 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?

catch’s picture

@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.

Wim Leers’s picture

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

Correct 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. 👍

More or less we need to replicate what we're expecting real sites to do, which is install ckeditor4 and uninstall ckeditor5.

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 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 confuses me 😅 Why exactly won't we add those until just before Drupal 11? 🤔

catch’s picture

Just 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.

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

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.

Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Status: Postponed » Needs work
Wim Leers’s picture

Title: [PP-1] Deprecate CKEditor 4 module in 9.5 » Deprecate CKEditor 4 module in 9.5
Assigned: Wim Leers » Unassigned
Status: Needs work » Needs review

Awaiting 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 👍

longwave’s picture

Almost there - looks like this needs #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests to land first.

Wim Leers’s picture

Title: Deprecate CKEditor 4 module in 9.5 » [PP-1] Deprecate CKEditor 4 module in 9.5
Status: Needs review » Postponed

Indeed!

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…

lauriii made their first commit to this issue’s fork.

lauriii’s picture

Title: [PP-1] Deprecate CKEditor 4 module in 9.5 » Deprecate CKEditor 4 module in 9.5
Status: Postponed » Needs review
longwave’s picture

Fixed the two remaining test failures, this run should be green.

Wim Leers’s picture

I think this is RTBC, but self-RTBC is really inappropriate in this case 🤓

quietone’s picture

Status: Needs review » Needs work

I 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.

Wim Leers’s picture

Status: Needs work » Needs review

Hm … 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 👍

Wim Leers’s picture

That 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 'm not 100% tests of those will start failing when ckeditor is marked deprecated.

So, converting the MR to a patch to test it against all three branches it would be committed too.

Wim Leers’s picture

Yay — 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! 👍

phenaproxima’s picture

Status: Needs review » Reviewed & tested by the community

The 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.

catch’s picture

Good 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.

Wim Leers’s picture

Yay, 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.

Wim Leers’s picture

Question: shouldn't we also deprecate the core/ckeditor asset library in here? 🤓

xjm’s picture

Status: Reviewed & tested by the community » Needs work

P.S.: I think you want #3270438: Remove CKEditor 4 from core Remove CKEditor 4 from core to be green prior to committing this, right?

Yep, 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...

Question: shouldn't we also deprecate the core/ckeditor asset library in here? 🤓

Yes. Do we also need a blocking issue to move the asset library into CKEditor's own namespace? NW for that.

Wim Leers’s picture

IMHO 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.

Wim Leers’s picture

Discussed this with @xjm yesterday. She agrees with #34.

Wim Leers’s picture

#3306712: Update NoJavaScriptAnonymousTest to use Standard profile instead of listing modules conflicted with this … but it'll also make this simpler 👍 Updating the MR.

Wim Leers’s picture

Just 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 🤓

Wim Leers’s picture

#3307186: Mark CKEditor 5 stable was just committed … so I think this is as unblocked as it can be 🤓

lauriii’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed 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! 🎉

  • catch committed 7057800 on 9.5.x
    Issue #3304326 by Wim Leers, longwave, catch, lauriii, quietone,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.5.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.