Closed (fixed)
Project:
Drupal core
Version:
10.0.x-dev
Component:
ckeditor.module
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Mar 2022 at 22:16 UTC
Updated:
23 Sep 2022 at 09:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
xjmSo based on that, we need to:
Comment #5
wim leersThe
big_pipefailure was for a regression test added for #2698811: BigPipe unnecessarily renders and sends multiple-occurrence placeholders multiple times when using JS — can cause JS errors.I think it'd be reasonable to omit a regression test that involved a specific module that no longer exists. But still, happy to try to update it to use CKEditor 5 instead nonetheless.
Tried that in aa368f25dd598ba0a34177451fc3c9ef7bf94a45.
Comment #6
wim leers+
This is 100% certainly because the Media Library CKEditor integration is not being removed. Easy fix 🤓
See c048195bdb2ee3df37864dc88744fb4d289d96bd.
Note: equivalent tests exist in the CKEditor 5 module:
\Drupal\Tests\ckeditor5\FunctionalJavascript\MediaLibraryTest.Comment #7
wim leersSimilar to #6: the Media CKEditor integration still needs to be removed.
This one is trickier, because many core themes have overrides for the media embed preview error. So did that part in a separate commit.
See f174785157f362596d31b071dad2bc1e99fa69a3 + 1150087da3e1519b902922d48108cb95406339b1.
Note: equivalent tests exist in the CKEditor 5 module:
\Drupal\Tests\ckeditor5\FunctionalJavascript\MediaTest.Comment #8
wim leersThe
restandjsonapimodule failures are trivial: the CKEditor module was only used to interact with sampleEditorconfig entities via REST/JSON:API for testing purposes. Easily changed. See b75618bbba904b2e3f3d2ed689bcf66736ed9df3.Comment #9
wim leersThere are lots of test failures in the CKEditor 5 module too. They fall in three buckets:
CKEditor4to5UpgradeCompletenessTestin Drupal 11, in #3239012: [11.x] Remove the CKEditor 4 upgrade path, I now realize that does not make sense, because the CKEditor 4 module's code is going to be removed in Drupal 10 and hence we also can no longer use that module's metadata to verify the completeness of the upgrade path.For the same reason
\Drupal\Tests\ckeditor5\FunctionalJavascript\CKEditor5CKEditor4Compatibilityno longer is needed: if CKEditor 4 does not exist anymore, there is no need to verify that both can co-exist on the same page either.→ commit a0decf0f7e3ddfbf45866ccd1919c8a7c2c1c52f
\Drupal\ckeditor5\SmartDefaultSettingsthat inspect a CKEditor 4 instance no longer are needed anymore either.→ commit 54ff3b14e56005384771a3afc61798fd64d8c152
\Drupal\Tests\ckeditor5\Kernel\SmartDefaultSettingsTest+CKEditor5AllowedTagsTest+\Drupal\Tests\ckeditor5\FunctionalJavascript\AdminUiTestto no longer use CKEditor 4, but instead use\Drupal\editor_test\Plugin\Editor\UnicornEditoror\Drupal\editor_test\Plugin\Editor\TRexEditor. This part remains to be done.Comment #10
wim leersinline_form_errors'\Drupal\Tests\inline_form_errors\FunctionalJavascript\FormErrorHandlerCKEditorTestcan be deleted — the CKEditor 5 successor is right next to it:\Drupal\Tests\inline_form_errors\FunctionalJavascript\FormErrorHandlerCKEditor5Test👍Commit: 3c6b525254c950f674df76b4c50acb78987e2f82.
Comment #11
wim leersEditorDialogAccessTest+EditorPrivateFileReferenceFilterTest+EditorAdminTestall should be updated to no longer use CKEditor 4, but instead use\Drupal\editor_test\Plugin\Editor\UnicornEditoror\Drupal\editor_test\Plugin\Editor\TRexEditor.This is similar to what I wrote in #9.4.
Issue created: #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests.
Comment #12
wim leersWhile awaiting DrupalCI, I bet there are now 25 remaining failures.
How do these break down?
editormodule and the 6 test failures inckeditor5module.aggregator, 2 inmigrate_drupal_ui, 1 inupdate) are occurring because this MR is currently deleting the Standard install profileeditor.editor.*default config. There was no upgrade path from Drupal 7 to the Drupal 8|9 CKEditor 4 text editor configuration, so simply creating new defaulteditor.editor.*(as described in #3) should fix these.In other words, we'll get down to 19 without extra effort (i.e. just deleting Quick Edit like is already happening), to 12 by adding two simple YAML files to this MR and to zero by doing #3270734, which we can already start doing.
So I propose we first do #3270734: Update Editor + CKEditor 5 module to not use CKEditor 4 in tests — which needs to happen anyway.
Comment #13
xjmThanks @Wim Leers.
The point here is actually not to delete integrations with other modules, because those integrations need to be move into CKEditor 4 in D9 and for the contrib module. We'll have a series of issues to do that. The deleted hunks can serve as a starting point for those child issues, though.
Comment #14
wim leers#13: Yep, but I wanted to prove that the long list of ~50 failures all over the place was not actually scary. That's also why I have scoped commits per integration module: to make it easy to transfer what I did here to other issues. 🤞
The prediction I had in #12 became a reality — although it's currently sitting at 27 failures instead of 25.
ConfirmClassyCopiesTesthas 2 failures, but that's a trivial thing to update/address.I'm stopping the work on this, I feel like I've turned enough of the unknowns into knowns to feel confident that this will not be painful to address 😊
Comment #15
lauriiiWe discovered that there aren't any templates or libraries shared between CKEditor 4 and CKEditor 5. Because of that, I think we should simply remove all of the references to CKEditor 4 from Claro, Olivero and Umami as part of this issue. We can leave the references in Seven, Classy and Stable since they are going to be removed from core before Drupal 10.
Comment #16
wim leersRepurposing this issue to actually remove CKEditor 4 — stay tuned for the issue summary update to follow the common "module removal" issue template.
In any case this is blocked on #3304326: Deprecate CKEditor 4 module in 9.5.
Comment #17
wim leersThis is now the CKE4 equivalent of #3227033: Remove Quick Edit from core for Quick Edit.
The newly created #3306563: [Meta] Tasks to remove CKEditor (4) from core and move to contrib is the parent issue now and is the CKE4 equivalent of #3274155: [Meta] Tasks to remove Quick Edit from core and move to contrib for Quick Edit.
Comment #18
wim leersComment #19
spokjeComment #20
spokjeComment #21
spokjeComment #22
wim leersIt should be possible for me to create an MR that is mostly green, so that we're ready to do this 😊
Comment #24
wim leers4 failures!
Not bad for the first try! 😄
Breakdown:
EditorPrivateFileReferenceFilterTest→ is already being fixed in #3306715: Replace ckeditor with editor_test in editor_private_test.info.yml, nothing to do here.UpdatePathTestBaseFilledTest,UpdatePathTestBaseTestandCKEditor5UpdateImageToolbarItemTestare all update path tests, and they all fail in the same way:The link Continue was not found on the page.I'll figure that out tomorrow 👍How I created this MR
In case this MR needs to be recreated again, I tried to semi-automate it most of the way:
Straight removals — module:
Straight removals — theme overrides:
Partial updates:
(
c5e50e3fe2b0d69a507965962fe3eecda4713008was10.0.xHEAD at the time!)Conclusion
I should be able to get it down to 1 failure tomorrow, and #3306715: Replace ckeditor with editor_test in editor_private_test.info.yml will get it down to zero.
(Also: #3285054: Add ckeditor5-stylesheets: false to Claro and Olivero (and fix it 😅) landed after the MR was created/while tests were running, so I'll need to update the MR anyway.)
Comment #25
wim leersThe one
editor_private_testfailureThat means this issue is not only postponed on #3304326: Deprecate CKEditor 4 module in 9.5, but also on #3306715: Replace ckeditor with editor_test in editor_private_test.info.yml. ⇒ bumping to
[PP-2](No code changes will be necessary here; all we need to do is wait.)
The 3 update path test failures
AFAICT the reason for the failures in all update path tests is simply that the
9.4.4dumps have the CKEditor 4 module installed but it's suddenly disappeared.So we need to add a stub
ckeditor.info.ymlfile. This is what @longwave mentioned over at #3304736-18: 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.But per @catch's guidance at #3304736-19: 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 and subsequent comments:
and
👆 In other words, this MR is functionally ready and "done". The part that is still missing is that complex (and hitherto unseen as far as I know?!) dance of providing a good UX for making the above happen — @xjm summarized and retitled that other issue well over at #3304736-26: 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.
⇒ bumping to
[PP-3]to indicate this is also blocked on that issue. We will likely need code changes here after that, so this is the one hard blocker to do any further work here.P.S.: Please credit @longwave, @catch and @xjm for their work on #3304736, that's made this much easier to diagnose! 🙏
Comment #26
wim leersRebased the MR for #3285054: Add ckeditor5-stylesheets: false to Claro and Olivero (and fix it 😅). That issue conflicted with the
partial-updates-*diff from #24. Updated. Other steps remain unchanged.Nothing left to be done here.
This cannot be committed until https://www.drupal.org/project/ckeditor/releases/1.0.0 is released, which in turn is currently blocked on the Drupal Security Team approving #3306909: Get Drupal Security Team approval to commit vendor/ckeditor.js to the drupal/ckeditor project.
Comment #27
wim leersNote: Because #3306938: Restore olivero_post_update_add_olivero_primary_color() was fixed, there are now 5 failing tests, not 4.
OliveroPostUpdateTestmeans that should now really be .Comment #28
wim leers#3306715: Replace ckeditor with editor_test in editor_private_test.info.yml landed.
Comment #29
wim leersAFAICT this is now only blocked on #3306545: Replace ckeditor with ckeditor5 in the 9.4.x database dumps in Drupal 10.0.x & 10.1.x, not #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 anymore. Updating title to indicate 1, not 2 blockers. 👍
Comment #30
wim leers#3306545: Replace ckeditor with ckeditor5 in the 9.4.x database dumps in Drupal 10.0.x & 10.1.x is in. Re-testing.
Comment #31
spokjeI'm not sure what to do (if anything needs to be done in the first place) with these
ckeditor-references that are still floating around:- https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/modules/edit...
- https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/modules/edit...
- https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/modules/edit...
Comment #32
wim leersExcellent catches, @Spokje! Especially those "for example"-style comments. And TIL
yarn spellcheck:make-drupal-dict, I had no idea we had that 😄Looks like this is … indeed still ready for review, hopefully the next person won't find anything 🤞
Comment #33
spokjeJust to be clear (blatantly playing the non-native speaker card): The linked "stragglers" in #31 are still present in the MR. I haven't touched those, since I'm completely unsure if they are eligible for deletion or a rewrite or a "whatever".
Comment #34
wim leersAha! I thought your commit handled those 😅 So apparently #31 lists the remaining stragglers after that commit. 👍
Comment #35
wim leersThe key remaining thing here (after @Spokje addresses The Three Stragglers) is the manual testing. That requires https://www.drupal.org/project/ckeditor/releases/1.0.x-dev to get an initial release (RC1, not stable). Will make that happen next.
Comment #36
spokjeWell, that "boomeranged" quickly... :)
Comment #37
spokjePushed commit c80f01a5035f9c743906000778943883d768d50b on 14:52 GMT.
No idea when this shows up in here, but I've addressed #34.
Putting this back to NR.
That commit is in the branch (https://git.drupalcode.org/issue/drupal-3270438/-/commit/c80f01a5035f9c7...), but (at least for me) is not showing up in the MR.
Comment #38
wim leers#37: Don't worry, this is "just" GitLab being incredibly slow. The Drupal Association is aware. Apparently the current hardware is VERY underpowered: https://drupal.slack.com/archives/CGKLP028K/p1661863372047599
Comment #39
wim leershttps://www.drupal.org/project/ckeditor/releases/1.0.0-rc1 is live 🚀
#3306909: Get Drupal Security Team approval to commit vendor/ckeditor.js to the drupal/ckeditor project is needed prior to tagging
1.0.0. But went ahead and tagged1.0.0-rc1so we can proceed here and in #3306563: [Meta] Tasks to remove CKEditor (4) from core and move to contrib.To manually test this, I think this is the test script we should follow — this test plan needs review:
9.5.xin the Standard install profile.10.0.xcomposer require drupal/ckeditor-ckeditoruntil — after #3308347: Ensure that ckeditor does not get special core treatment is done we should be able to docomposer require drupal/ckeditorinstead, but that has not yet happened./node/add/article, CKEditor 4 should still work fine.Comment #40
wim leersComment #41
nod_Steps should be:
9.5.xin the Standard install profile.ckeditormodule (disabled by default in standard 9.5.x)Basic HTMLformat to useckeditorcomposer installcomposer require drupal/ckeditor-ckeditoruntil — after #3308347: Ensure that ckeditor does not get special core treatment is done we should be able to docomposer require drupal/ckeditorinstead, but that has not yet happened./update.phpor clear caches manually/node/add/article, CKEditor 4 should still work fine.We might need to do a 9.4.x => 9.5.x => 10.0.x update but we'll need to remove the rdf module between 9.4 and 9.5. Not sure what's best. steps above works.
Comment #42
wim leers#41: hah, I forgot that we just disabled CKE4 as being the default even though I worked on that 🙈🤣
#41 looks more accurate for sure. Thanks!
Comment #43
nod_To be explicit I did run the steps in #41 and they are working as intended.
Comment #44
lauriiiTested this locally with Umami using steps from #41 and all worked as expected 🎉 Also confirmed I was able to change from the contrib CKEditor 4 to CKEditor 5 using the upgrade path.
Comment #45
lauriiiclassy.info.ymlbecause it will be removed from Drupal 10 but I think what is being done there is fine ✅hook_helpupdates make sense ✅Based on that, I think this is ready to be committed whenever #3304326: Deprecate CKEditor 4 module in 9.5 is done 🎉
Comment #46
wim leers🥳
Comment #47
catchI just committed #3304326: Deprecate CKEditor 4 module in 9.5 to 9.5.x since the patch here also looks good.
On #3306909: Get Drupal Security Team approval to commit vendor/ckeditor.js to the drupal/ckeditor project @greggles asked for a week for feedback five days ago, so I think we are good to proceed there tomorrow/Friday.
#3308347: Ensure that ckeditor does not get special core treatment is still open but we know that process works with other core module removals, so as long as it's open I think it's fine.
All this to say I think we're good to proceed here, I'll wait until some time tomorrow just to give a little more time for +/-1s on #3306909: Get Drupal Security Team approval to commit vendor/ckeditor.js to the drupal/ckeditor project and potentially a 1.0 for the contrib module if we think that's settled (and because it's late now). Of course other committers welcome to commit this whenever too!
Comment #48
catchChecked the timelines on #3306909: Get Drupal Security Team approval to commit vendor/ckeditor.js to the drupal/ckeditor project and it's already had over a week for feedback from the security team, a couple of +1s and no objections. Given it was just confirming existing policy, marked it fixed.
Comment #49
wim leersI think that's reasonable! Proceeding in #3306630-32: Split the core 9.5.x ckeditor history into a new 1.0.x branch and cut a 1.0.0 release. 👍
Comment #50
wim leersOops — I meant to post #49 on #3306909 🙈 Did that in #3306909-13: Get Drupal Security Team approval to commit vendor/ckeditor.js to the drupal/ckeditor project.
https://www.drupal.org/project/ckeditor/releases/1.0.0 is live, which AFAICT means this is unblocked 😊
Comment #51
wim leers@catch pointed out that the MR does not apply to
10.1.x.Unfortunately this:
means that we need a separate
10.0.xand10.1.xpatch 😬 For a single line! :P(That change was introduced by #1014086: Stampedes and cold cache performance issues with css/js aggregation.)
Comment #52
catchCommitted/pushed to 10.1.x and cherry-picked to 10.0.x, thanks!
Comment #55
phenaproximaThis needs release notes.
Comment #56
wim leers#55: done.
Also created the missing change record: https://www.drupal.org/node/3308802.