Problem/Motivation
The ckeditor_stylesheets
property in a theme's info.yml makes it possible to CKEditor contents with CSS from the front-end theme. More info on ckeditor_stylesheets use here.
This also needs to be supported in the CKEditor 5 module, but accounting for the fact that it can't be a 1:1 equivalent due to CKEditor 5 not being style fenced by an <iframe>
).
Steps to reproduce
Proposed resolution
- Add a new
ckeditor5-stylesheets
theme info property for adding default theme CSS files to CKEditor 5 editor instances. It's provided as a new property as CKEditor 5 is not encapsulated in an<iframe>
and functions differently as a result. ckeditor_stylesheets
loads CSS that site editors rely on for their editing experience. This can range from minor UI improvements to styles essential to representing the content they are editing. Becauseckeditor5-stylesheets
is an entirely different property fromckeditor_stylesheets
, switching to CKEditor 5 (be it an optional switch in Drupal 9 or as part of a Drupal 10 upgrade) will remove these styles entirely. This can result in significant UI regressions. If there isckeditor_stylesheets
config without correspondingckeditor5-stylesheets
config (even ifckeditor5-stylesheets
is just opt-out by setting it to FALSE). This is a potentially significant regression that may not get the attention it deserves if only present in a change record. The extensive validation process when switching from CKeditor to CKeditor 5 may also lead to the impression that all considerations are accounted for despite the CSS not being part of that process. There should be additional means of preventing this regression. Two options come to mind:- add a warning in the text format edit form and non-public facing CKEditor5 instances to alert people to the fact that CKEditor 4 has custom styling configured that is not applied to CKEditor 5. The text format warning is present to alert site admins and will contain more information. The CKEditor 5 instance warning is present to alert content editors as to why their UI changed, and the information needed to report the issue (this is particularly needed for scenarios where the site admin is not in-house)
- Somehow making this part of the deprecation check process.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#76 | 9-10-differences.txt | 680 bytes | Wim Leers |
#76 | 3194084-76-D10.patch | 33.73 KB | Wim Leers |
#76 | 3194084-76-D9.patch | 33.72 KB | Wim Leers |
#65 | Screen Shot 2022-02-11 at 11.24.08 AM.png | 139.35 KB | bnjmnm |
#65 | interdiff_63-65.txt | 12.01 KB | bnjmnm |
Issue fork drupal-3194084
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:
Issue fork ckeditor5-3194084
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:
- 3194084-support-ckeditorstylesheets-setting changes, plain diff MR !52
Comments
Comment #2
bnjmnmFrom what I can tell by reading the CKEditor 5 docs, adding editor-only stylesheets is now part of the build process, not something easily done with a prebuild library loading
My first thought is to dynamically load versions of the stylesheet styles with a
.ck-content
prefix, triggered by CKEditor'sready
event similar to how I did it for CKEditor styles in off-canvas dialogs.core/modules/ckeditor/js/ckeditor.off-canvas-css-reset.es6.js
Perhaps there's a more elegant way? At the very least, this approach is familiar to me.
Comment #3
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedHi,
Creating a patch for this issue.
Please review the patch.
Thanks.
Comment #4
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #5
bnjmnmA few things with #3
I'm not sure what this patch was intended to do, but there are a few reasons it's not applicable to this issue
ckeditor_stylesheets
is a property used by themes, not modules. When a front end theme specifiesckeditor_stylesheets
, the styles in those sheets should also be present in CKEditor. This is how it currently works in CKEditor4 and should continue to work this way in 5. For example, the CSS files speficied in Bartik'sckeditor_stylesheets
should have their styles applied to CKEditor when Bartik is the front end theme.ckeditor_stylesheets
is for loading css files. These are all Javascript files.If you'd like to continue with the issue, feel free to weigh in on the feasability of the solution proposed in #2. Additional patches can start from scratch, no need to diff from #3
Comment #6
Wim LeersThis seems like the only viable approach to me too 🤓
I think a rough prototype should prove the viability of this.
bartik.info.yml
includes:That should at least show up for the
<a>
tag for example.Comment #7
Wim LeersA caveat: some tags used to make sense in the CKEditor 4 era, but won't in the CKEditor 5 era.
<iframe>
instances needed this, notcontentEditable
ones (because then the live CSS already applies). I think with CKEditor 5, we need it always. Needs to be confirmed.<iframe>
instances necessarily also have<html>
and<body>
tags. You can see this incore/themes/bartik/css/base/elements.css
for example:How to make this work in both CKEditor 4 and 5?
I propose:
html
body
to.ck-content
Comment #8
Wim LeersI was going to link to the core issue that added
ckeditor_stylesheets
to the Drupal 8 coreckeditor
module but apparently it already was included in the very first commit: #1890502: WYSIWYG: Add CKEditor module to core.Comment #9
Wim LeersFYI: #3205565: Add language of parts plugin is the first to port in-CKEditor-instance styling from Drupal 8/CKEditor 4. it confirms that #7 is possible and AFAICT confirms @bnjmnm's proposal in #2 👍.
Comment #11
bnjmnmI got this working. Also made it evidient that the off-canvas CSS solution does not account for media queries, but it works here so shouldn't be difficult to apply that solution to it as well.
Comment #12
bnjmnmNote that The approach in the merge request may be kind of resource heavy, but the generated CSS won’t change all
That often so it’s probably worth finding a way to cache this with local storage or something similar.
edited to add: with the current approach, I'm not sure how to cache without potentially serving stale CSS as the CSS paths do not include cache busting args. This may not be that noticeable a hit based on some crude timing tests. On my local install, the CKEditor instance takes ~30ms to initialize. this added CSS takes ~1.5ms. This will obviously differ depending on system, but perhaps it's not enough of an increase to the existing initialization time to be a concern?
Comment #13
bnjmnmComment #14
Wim LeersCKEditor 4 explicitly supported external stylesheets:Yes, holy crap! 🤯\Drupal\Tests\ckeditor\Kernel\CKEditorTest::testExternalStylesheets()
. Is that expected to still work?It is thanks to this magic that my previous point was a non-concern!
I think the best/most elegant solution here is to:
localStorage
Comment #15
Wim LeersThis looks pretty far long already, which is very encouraging 👍
Comment #16
Wim LeersNote:
classy
does this:\Drupal\Tests\media\FunctionalJavascript\CKEditorIntegrationTest::testErrorMessages()
is specifically asserting the presence of that CSS:This needed to be commented out in #3206522: Add FunctionalJavascript test coverage for media library — it has a
@todo
pointing here.Comment #17
Wim LeersWe'll need to redo the MR from scratch as we move from the
ckeditor5
project to thedrupal
project.But … since the current MR is already dating back to June, it pretty much would need a rewrite anyway. Hence: almost no extra work necessary 🤓
Re-assigning to @bnjmnm because he knows this by far the best!
Comment #20
bnjmnmGitlab wasn't fully cooperating with the switch from contrib to core, but I wanted to get my progress on the issue before I took the time to figure it out. Here are the changes in classic patch form.
Comment #22
bnjmnmThe test failures in #20 were due to accidentally deleted files. They're brought back here. No interdiff since the only change is not deleting a directory in HEAD that shouldn't have been deleted.
Comment #23
Wim Leers🤔 Should we specify that this is for both CKEditor 4 and 5?
Or … should we change the theme
*.info.yml
property tockeditor5_stylesheets
instead?The CSS will have to be different, so that does feel appropriate.
🐛 This library does not exist?
core/ckeditor5
was correct.🐛 s/ckeditor/ckeditor5/
Nit: we used
fooCKEditorBar
everywhere else, notfooCkeditorBar
— because it is a given name/abbreviation.Why not use https://www.php.net/manual/en/language.types.string.php#language.types.s... or https://www.php.net/manual/en/language.types.string.php#language.types.s... syntax instead? Then we would not have to repeat this in a comment! 🤓
(And then we could use it for the other test cases too!)
Comment #24
lauriiiIt doesn't necessarily have to be different because the CSS could be really generic, like changing the font-family for native HTML elements. However, since we can't guarantee that the CSS will work same as it did with CKEditor 4, it might be safer to deprecate
ckeditor_stylesheets
and replace it withckeditor5_stylesheets
.I'm wondering if that could potentially allow us to also remove the assumption that the CSS is only applied for the CKEditor instance. We could make it the themers responsibility to appropriately scope their CSS for CKEditor. That would be less complex to implement and less complex for themers to debug.
Comment #25
Wim LeersThat's a good example. But it's still crucially different CSS:
<iframe>
and therefore your CSS selector for that could've been* { font: …; }
.ck-content
, so:.ck-content * { font: …; }
The CKEditor (4) module is known to go away already; this is only a natural consequence of that. An explicit deprecation might be good to give people advance warning though, and I suspect this is what you mean?
Yes, see above! That's definitely going to happen, there's no way for us around that.
Comment #26
Wim LeersD'oh — @bnjmnm's magic is actually what removes that distinction and makes it happen automatically — so I'm completely wrong! 🙈
I guess the conversation in #23 + #24 + #25 leads to a question: do we want to make the pre-existing CKEditor 4-targeting CSS automagically work in CKEditor 5? Or do we want to ask theme maintainers to provide a CKEditor 5 alternative?
Right now we're only asking module maintainers to make changes. The state of the patch in this issue means theme maintainers won't have to do something like that. But the direction #23 + #24 + #25 would take us in, would force them to also make changes.
So:
ckeditor5_stylesheets
property too, which requires CSS to be written for CKEditor 5, and which does not have the magic. This can be a nice-to-have follow-up that is not stable-blocking.Comment #27
lauriiiDiscussed this with @bnjmnm and @Wim Leers to decide path forward here. We agreed that we would test the current implementation with Olivero and Bartik to determine the path forward.
I did some manual testing on both of the themes. Unfortunately, I don't think the current implementation is really doing what we expect it to do. For example, neither of the themes are able to change the font-family used in the editor because the property is targeting
body
andhtml
elements. I also tested some custom styles for built in HTML elements, and in most cases CKEditor has more specific CSS that overrides the customizations.There's also a high risk that generic CSS overriding CKEditor styles will accidentally cause usability and/or accessibility issues. For example, Olivero is changing the link color to something that leads into inaccessible color combinations with CKEditor styles. Some of this could be made to work, but I think there's a high risk that CSS that is not built to integrate with CKEditor will have unwanted side-effects.
Based on this, I'm leaning towards the simplest approach where we provide new key in theme info.yml, and the theme maintainers are responsible for scoping CSS selectors properly. This is best from expectation management perspective because it seems like coming up with CSS processing that is able to take into account all edge cases could be expensive to implement and maintain.
One of the use cases that @bnjmnm raised was that it's important that CSS components defined in a theme, must continue to work in CKEditor. I think this isn't necessarily at risk with CKEditor 5, even if we don't automate scoping the CSS. The custom components shouldn't be styling HTML elements, and should simply use specific enough class names that don't collide with out admin UI. CKEditor also doesn't ship with styles for these custom elements meaning that specificity issues are less likely to occur. This means that themers could pretty safely load their CSS for CSS components to be rendered in the CKEditor without prefixing every CSS class with a CKEditor class.
Comment #28
Wim Leers#27: If I try to summarize your concerns:
Is that a fair summary?
Comment #29
lauriiiI think the summary would be that:
And with these I'm trying to make a point that we probably won't gain much from the extra complexity that is involved with automatically prefixing all selectors.
Comment #30
Wim Leers👍
That's clear to me now.
Really curious to hear @bnjmnm's thoughts 🤓
Comment #31
lauriiiDiscussed with @bnjmnm and he has some reservations on the potential impact to people upgrading from CKE 4 to CKE 5. He said that he would like to see how the CR for this change could look like, and wanted to make sure that we invest enough time into figuring out how the changed behavior can be communicated to users.
Based on that, I'll start working on a CR draft.
Comment #32
Wim LeersPer #31.
Comment #33
lauriiiNo interdiff since this is patch for the new approach.
Comment #34
lauriiiComment #35
Wim LeersI didn't know such an empty asset library definition was possible/permitted!
Can we add an
@see
to point to the code where we populate this definition?Woah, what's going on here! 🤔
It'd help if it were documented what the structure of the return value of the helper method was.
🐛ckeditor5_stylesheets
(underscore, not dash) — for consistency withckeditor_stylesheets
Ahhh! No! This is better, because it makes CKE5 consistent with all other theme info properties! It was the CKE4 theme property that was inconsistent before! 🙈
👏
🤓 We don't need
editor
if we're specifyingckeditor5
.Missing
{@inheritdoc}
.🤓
weight: 0
basic_html
because this clearly does not look like the "Basic HTML" text format we all know.s/CKEditor/CKEditor 5/
Can we change this to use a
@dataProvider
instead for better legibility?Comment #36
lauriiiThis should address all except #35.8.
#35.8: This was directly copied from
\Drupal\Tests\ckeditor\Kernel\CKEditorTest
. I can refactor this if think that would be helpful but I wanted to just provide equal test coverage to what we had before.Comment #37
Wim LeersThanks, looking good! (Except the hunk before the last one, that looks like an odd change.)
If we can spend 5 minutes now to refactor this using a data provider, it'll make this test easier to maintain and understand for the next decade 🤓
Comment #39
lauriiiThere's only one case so I thought it made more sense to remove it from there.
Sure! I thought what I had there would be the simplest possible change but not worth arguing whether we should do it or not since it literally takes 5 minutes to do that. 😅
Comment #40
Wim LeersLooks good to. me! Curious what @bnjmnm thinks 🤓
Comment #42
Wim LeersHUH …
caused by
in
ckeditor5.libraries.yml
🤔
Comment #43
bnjmnmI'd like to figure out a way to gently alert content editors about this change. I'm concerned the people most impacted by this may not be the ones reading the change record.
Ideally I'd like something associated with individual user accounts that can be opted out of indefinitely once they've seen it, and there's specific criteria for it appearing at all so it doesn't show up for users that never used CKEditor 4 or for themes without ckeditor_stylesheets. I'm also aware that may be an unreasonable amount of conditional logic for a little help message so I'll think of some options and invite others to do the same.
Comment #44
lauriiiIf we want to provide a warning to users about this change, I think we could trigger it based on
ckeditor_stylesheets
existing in the default themes info.yml withoutckeditor5-stylesheets
. If we go with that approach, we need to decide whether it should be visible on the text format form and/or on pages that are using CKEditor 5.Comment #45
Wim LeersOhhh, this is a really great point!
I think we could and should add a validation constraint that checks whether the default front-end theme contains
ckeditor_stylesheets
but does not containckeditor5_stylesheets
. We can then warn the user about that. (And for ensuring it's a warning, not an error, searchcore/modules/ckeditor5
foraddWarning
— there's a precedent for that.)Perhaps in addition to that, we could implement
hook_requirements()
to add a warning on the status report too?Comment #46
bnjmnmDiscussed the message with @lauriii and @Wim Leers and we agreed this could be triggered by the presence of an active
ckeditor_stylesheets
without an equivalentckeditor5-stylesheets
and the message will be visible on any fields using CKEditor 5 as well as the text format form. We'll begin with the underlying logic then iterate on the message language to ensure it helps more than complicates.We also need to create followups for any core theme use of
ckeditor_stylesheets
as they will need equivalentckeditor5-stylesheets
, though they may result in somewhat different appearances, due on variables such as CKEditor 5's built-in stying providing a better experience.Comment #47
bnjmnmThis adds the logic for the warnings, as well has hastily-written warning messages that will undoubtedly improve after they are discussed.
Test coverage for the warnings appearing was added, but should probably be expanded to ensure warnings aren't presented when they shouldn't be.
The error examined in #42 will likely still occur.
Comment #49
bnjmnmAdded test coverage to ensure there aren't false positives.
Also addressed the fail mentioned in #42 - there's test coverage for that solution too.
Comment #50
Wim Leers🤓 One empty line too many.
🤓 s/page/route/
Suggestion:
🤔 Does this actually work? AFAICT
hook_library_info_alter()
is called only once, and the result is cached.See
\Drupal\Core\Asset\LibraryDiscoveryParser::parseLibraryInfo()
, which invokes this.I think we need to move this logic to
hook_page_attachments()
instead.🤓 Nit: s/$moduleHandler/$module_handler/
🤓 s/CKeditor/CKEditor/
🤔 And … should we make this a link to the (yet to be created) change record?
Same link remark as above.
🤔 This is not the IE11 warning?
Comment #51
hooroomooComment #52
hooroomooI wasn't sure how to address feedback #4, 6, 7, 8 from comment #50 so that still needs work but the patch has the other fixes.
Comment #53
lauriiiWhy are we checking the admin route? CKEditor could be rendered on the front-end too, why are we not rendering the message then? This includes the node form when "Use the administration theme when editing or creating content" is unchecked.
Shouldn't we be checking if the
ckeditor5-stylesheets
key is present in the info.yml? This way if the stylesheets are not needed with CKEditor 5, an empty value could be used for removing the warning.This message is potentially confusing to non-technical users since they might not understand what's the impact of this. I think we need some explanation of that here.
I think there's potential for confusion with the current message because it could be implying that all of these stylesheets need an equivalent in CKEditor 5 for the message to not appear.
What's the benefit of rendering the stylesheet names in the message? I think it would be more important to explain which theme the message is about and have a link to the change record for instructions.
Comment #54
bnjmnm#53.1
I suspected there's was no perfect existing solution, so I thought admin route might be a "good enough" for a few reasons:
That's my thought process.
Comment #55
Gábor HojtsyThe issue summary does not explain why the ckeditor5 stylesheets must exist (even if ckeditor4 ones existed). Are we assuming the theme is styling some CK compoennts specifically that they also want to style for CK5? Will something break if this does not happen or will things look funny? I don't recall a scenario where we did a transitional warning like this when a theme did not implement something we thought may break the UX.
I totally agree displaying a warning about a theme component missing to site end users is not a good idea. I don't understand yet the severity of the situation.
What's the impact and what to do about this? A changelog link or docs page link would be useful if we consider this warning is desired due to the impact, so those seeing it have a next step to take. Without that its just "ok, why is that a problem and what now?".
Comment #56
bnjmnmComment #57
Gábor HojtsyI think there are 3 of these instances of the warning in the patch. The UI impact is not clear, two of the direct CK warnings would show on the page's error messages when CK is shown (on an admin route, given that that is when the data is added only). Contrary to the error message, the stylesheets are not paired up, meaning the equivalence of stylesheets is not checked (and I don't think they could be). Also given the big difference with CK4 to CK5, I am not sure "equivalent" is the right approach to suggest even?
For me I think the errors would be best shown on the CKEditor configuration screen, but it would ideally cycle through and be collected/shown for all enabled themes. Then you would get an overview of what might break. If the text format configuration screen is where we aim to make ckeditor configuration foolproof, that would be the best / standard place to warn admins about the lack of theme support as well, no?
Comment #58
Gábor HojtsyAlso, thanks for updating the issue summary :)
Comment #59
bnjmnmThis incorporates the feedback from #57. The message checks all themes and distinguishes between the primary theme and base theme. Note that if the primary theme has ckeditor5-stylesheets, the base themes are not checked as it could be configured with
ckeditor5-stylesheets: false
, which could mean "I'm not bothering with CKEditor 5 stylesheets in general"Here's what it looks like when using Gin, to demonstrate the message accounting for primary and base themes - and also reporting for default/admin.
If this approach seems good, the test coverage should probably expand a bit to include base theme scenarios.
Comment #60
Gábor HojtsyI think this is great. The text itself is a bit convoluted, but it may need to be that way due to what it tries to convey.
Comment #62
lauriiiShould we just provide list of all enabled themes that have
ckeditor_stylesheets
without explaining which theme they are? That would probably make sense in most cases since usually people wouldn't have too many themes installed. That way we could simplify the messages to something like:Comment #63
bnjmnmThis is to address the test failures, we'll still need to discuss the suggestion in #62, though
Comment #64
Gábor Hojtsy#62 sounds like a good suggestion :)
Comment #65
bnjmnmIncorporates the suggestion in #62 and expands test coverage of the warnining to include base theme use cases.
Comment #67
bnjmnmI opened an MR in order to use the Gitlab UI for some walkthroughs, with the same changes as #65. We can continue using the patch workflow for this issue and I'll take care of anything that gets out of sync.
Comment #68
Wim LeersLooking great 😊
Posted a few nits and a few deeper questions.
Comment #69
Wim LeersThis looks way simpler now! :D
BTW, already RTBC'd #3265230: Refactor ie11.filter.warnings.es6.js to simpler structure & other improvements, thanks for splitting it off from this one! 😊
Yay clear scopes :)
Comment #70
Wim LeersAnalysis
The message always gets set by
ckeditor5_form_filter_format_form_alter()
.The problem is that when first accessing
/admin/config/content/formats/manage/basic_html
(i.e.GET
),_update_ckeditor5_html_filter()
does not run, which means the message is not consumed. Therefore it is still available by the time\Drupal\Core\Render\Element\StatusMessages::renderMessages()
runs.Because
has been changed to use
'#type' => 'status_messages',
, it has the same placeholder as\Drupal\system\Plugin\Block\SystemMessagesBlock::build()
, so when\Drupal\Core\Render\Element\StatusMessages::renderMessages()
runs, it replaces both placeholders. Voila: this is why it appears twice!Solution
We basically want to make this CKEditor 5-specific message to appear in a specific location, and not in the default messages location. Confirmed this with @bnjmnm.
So we need to prevent the placeholdering mechanism from getting in the way. We can do that by:
'#type' => 'status_messages',
and then resetting the global state (well, the session metadata, so sort of global state) that contains the accumulated messages, then forcefully rendering it (to prevent it from still becoming a placeholder and hence delaying the rendering and hence still containing all messages), and then restoring the global state. This is implemented in1f7c4e17cd997bfe27f06e567581ef3e95a73709
.'#theme' => 'status_messages',
, which is what'#type' => 'status_messages',
eventually ends up calling anyway, but we'd call it directly. This is fine: it is a template that is not marked@internal
. The significant benefit is that we then don't need to mess with global state nor do we need to do early rendering anymore: we can just pass an explicit list of messages! This is implemented ind8eddd7e89de5dd76ed9170bc78099053facba5e
.IMHO that second solution just makes it way simpler to understand, less risky, etc. I think the diff shows this clearly too. Hopefully you agree 😊
Comment #71
bnjmnmHad to move some code around in
library_info_alter
due to a condition causing it to return early. Filed an issue for the bug #3267204: library_info_alter can abort early if locale is not enabled, and worked around it by having the code here run before the bug happens.Comment #72
Wim Leersckeditor5_library_info_alter()
to run again, because modifyingsystem.theme
config does not invalidate thelibrary_info
cache tag. Installing a new (theme) extension causes all caches to be wiped, which is why this is not noticed by theAddedStylesheetsTest
test.Solution: do something like
\Drupal\color\EventSubscriber\ColorConfigCacheInvalidator
to invalidate thelibrary_info
cache tag whenever thedefault
key-value pair insystem.theme
is modified. Functional test coverage similar to that in\Drupal\Tests\color\Functional\ColorTest::testOverrideAndResetScheme()
would then be able to prove that this works correctly.Kicking back to
for that second point, even though I was very close to RTBC'ing — it's only when I started to actually test the functionality this is adding — sorry! 😬Comment #73
bnjmnmAddressed #72 and created followups
Comment #74
Wim LeersAha, not currently mergeable — probably because of
.a49af1b2049d50db5a1aaab5a87f39bf88ae47c6 should fix that.
P.S.: I had to disable the core
pre-commit
hooks to be able to merge this, it was causing the merge commit to fail like described here: https://iffgit.fz-juelich.de/fleur/fleur/-/issues/164 🤯Comment #75
Wim LeersI made only trivial changes, so I can still RTBC this:
Review
Re-tested the problem I found in #72. Works perfectly now! 👍
Really subtle problem with test coverage that took a lot of time to figure out😬
That is, until I made the service private. The test coverage looks solid, but … it somehow always passes, even if I remove the new cache tag deleting event subscriber! 😱
It's as if it's wiping the caches in the test when in a non-test Drupal, it is not wiping the caches. Putting a breakpoint on each of the three
$this->drupalGet('node/add/article');
calls in the test plus one inckeditor5_library_info_alter()
actually proves this! 🤯 Holy shit — what's going on here?!Well … turns out this happened because we were retrieving
node/add/article
in the default theme rather than the admin theme. Fix: setnode.settings
'suse_admin_theme
toTRUE
.Except that STILL did not fix it! It was still using the front-end theme. After some debugging, I realized the test user must have the
view the administration theme
permission. Added that.Now the test fails as expected 👍
That's what you should see in 7441307e5b0f5d40cdd5eb74c142db6dc6d06a14: tests should fail. The fix is then simple: make the event subscriber service public again (that was my mistake, but it's only thanks to that mistake that we discovered the test coverage was not actually testing what it should be testing 🙃). That's what you see in fc4876049ca1bd17af63599cf38dfb7170bc2ee7.
Comment #76
Wim LeersPatches for all 3 branches.
FYI: the
-D9
patch should also apply to 9.3, but won't yet, because there are several commits still to be cherry-picked to 9.3.Comment #78
Wim LeersD10 failed, but 100% unrelated random fail:
Re-testing.
Comment #81
lauriiiCommitted 2846170 and pushed to 10.0.x. Committed the 9.x patch to 9.4.x. Thanks!
Leaving open for 9.3.x backport once the test results come back.
Comment #82
lauriiiSeems like we need new patch for 9.3.x
Comment #83
Wim Leers@lauriii AFAICT that's only because #3260032: CKEditor 5 adds ie11.user.warnings library to every page, triggering a FOUC even for anonymous users has not yet been cherry-picked to
9.3.x
🤓😅Comment #85
bnjmnm@Wim Leers was correct in #83. Cherry picking that to 9.3.x, made it possible to cherry pick this to 9.3.x.