Needs work
Project:
Drupal core
Version:
main
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Oct 2025 at 02:08 UTC
Updated:
24 Mar 2026 at 15:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nicxvan commentedComment #3
nicxvan commentedComment #5
berdirI'd really prefer to do the big themes properly grouped and not just one big hooks class. And those in a dedicated issue.
We know better now how to group them and otherwise it will result in another chain of follow ups
Comment #6
nicxvan commentedAt first I agreed with you, I was really just testing how this worked with themes for rector.
However, I think we should do this automatically for a few reasons.
1. Test rector on themes
2. We've seen how long even just simple organization can take in the queue, let's at least remove the .theme files I think followups will be simpler for themes
3. I think with the comment issue this is pretty much done and will be ready for testing
Comment #12
nicxvan commentedComment #13
nicxvan commentedComment #14
nicxvan commentedComment #15
nicxvan commentedComment #16
berdirThe fail in InstallerTranslationTest happens on /admin/config/regional/language and the exception backtrace is this:
The test has
protected $defaultTheme = 'test_theme';but on that page, \Drupal::getContainer()->getParameter('container.themes') only has stark. Changing the test to use stark gets the test passed that line but fails later due to theme specific checks.I'm guessing installer tests don't set up the theme properly, they set it as the active one without properly installing it.
Comment #17
nicxvan commentedThank you!
Is in the installerTestBase and adding the install during the test doesn't fix it either. I'll have to investigate further.
Edit, just to see where this was going wrong I added:
$themes = \Drupal::getContainer()->getParameter('container.themes');Right before where the test dies and I see:
I'll try reviewing from the other direction.
Comment #18
nicxvan commentedOk I dug in more to the Theme settings failure, and it's a weird one, it's because
test_theme_themeisn't the admin theme so the hook adding the field doesn't run.Setting it to the admin theme works manually testing, I tried:
and
Neither work in the test.
Reverting the hook does work though.
Comment #19
nicxvan commentedI found the theme settings failure, we call it directly:
I'll revert that one conversion for now and create a follow up.
Comment #20
nicxvan commented#3560833: Create better way to manage theme setting alters I'm going to revert that conversion here.
Comment #21
nicxvan commentedAlso reverted starterkit in favor of: #3560844: Update starterkit and GenerateThemeTests to handle OOP hooks
Comment #22
nicxvan commentedI also reverted test theme for #3560851: Convert test_theme to OOP
Comment #23
nicxvan commentedComment #24
phenaproximaI am not entirely qualified to sign off on this, but I do like how the actual change is like 10 lines long, and the rest of this is just removing
.themefiles in favor of classes. That's really nice to see.Maybe a comment in the theme registry, to clarify what it's doing, would be nice? It's hard to grok without a lot of background context loaded into one's brain.
Comment #25
nicxvan commentedThank you, I addressed all of your feedback.
I think it's actually better to keep the change in #3556794: preprocess_HOOK__candidates in themes can be assigned to module invoke maps since several of the conversions here test that better than the test in that dedicated issue.
This should be ready for review again.
Comment #26
catchComment #28
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #29
nicxvan commentedComment #30
nicxvan commentedComment #32
nicxvan commentedConverted this to a meta, I created three issues for the remaining core themes.
I'll create follow ups for the .theme files once those are all committed.
Comment #34
nicxvan commentedJust a couple more!
Comment #35
nicxvan commentedComment #36
nicxvan commentedComment #37
nicxvan commentedComment #38
nicxvan commentedComment #39
berdirThe claro_system functions I think shouldn't be in claro at all I think, they are currently called by system module, but all of that and the related helpers should be moved to toolbar, which is moving to contrib, it's overlapping with the system.module function removal issue. I think it makes sense to do them together.
Comment #40
nicxvan commentedYeah I'll remove that here, then update the system.module issue once this and the translation config one lands.
Created #3579899: Remove remaining claro.theme functions
Comment #41
nicxvan commentedComment #42
nicxvan commentedComment #43
nicxvan commentedComment #44
nicxvan commented