Closed (fixed)
Project:
Drupal core
Version:
10.3.x-dev
Component:
plugin system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Jun 2024 at 14:08 UTC
Updated:
22 Oct 2024 at 18:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
grimreaperComment #4
grimreaperProvided a MR with a failing test to demonstrate the problem.
Comment #5
grimreaperhttps://git.drupalcode.org/issue/drupal-3457863/-/jobs/1984798#L4263
Comment #6
grimreaperCopy pasting works from @maboy in #3263526: UX: Add other widgets than select, MR 47.
I will try to use that for a generic fix.
Comment #8
pdureau commentedComment #9
grimreaperComment #10
grimreaperI have just put code from comment 6 into the getThemeDirectories method of the themeHandler directly.
I have changed the logic to not rely on itself anymore to avoid infinite loop. And so I had to change some variables name. I hope the logic is still ok.
At the beginning I tried a "simplified" approach based on:
And only handle those themes but the problem is that it can be null, at least in the tests.
Comment #11
grimreaperTest are green now. Thanks @maboy!
Comment #12
grimreaperSo, testing with UI Suite modules, I started with UI Styles.
No problem on the default theme which is a sub theme of ui_suite_bootstrap generated using its starterkit.
But if I go on a page which should be contextualized on ui_suite_bootstrap, it does not detect the styles overridden by its sub theme.
See attached screenshots. Also I attached the styles of the sub theme.
So maybe the envisaged solution is not ok and all plugins provided by YAML should follow SDC logic to have the provider automatically prefixed in the plugin machine name to avoid overlaps.
Comment #13
smustgrave commentedNice work everyone,
Believe to be very close just a couple nitpicky stuff.
Comment #14
grimreaperComment #15
grimreaperReview comments addressed.
Comment #16
smustgrave commentedFeedback appears to be addressed
Comment #17
grimreaperThanks for the RTBC but I don't know if it's not too soon. See comment 12.
At least in RTBC this will more attract attention from maintainers to get feedbacks.
Comment #18
pdureau commentedAbout theme hierarchy (A is the base theme of B which is the base theme of a C which is the active theme):
Comment #19
grimreaperAdding the parent theme in the dependencies list of the child theme has no effect.
Comment #20
grimreaperThe pipeline failed on one test: Drupal\Tests\ckeditor5\FunctionalJavascript\ImageUrlProvider, I don't think it is related to the change in this issue.
Comment #22
grimreaperExisting kernel test updated.
Pipeline still gets some random failure from other unrelated tests.
Comment #23
grimreaperComment #24
catchTalked with @grimreaper and @longwave about this issue at Drupal Barcelona. Existing test coverage looked great, found a way to move the ordering logic up a layer (actually removing it in the end which was unexpected but even better). RTBC for me now.
Comment #25
longwaveGiven we're touching this code to add a foreach() I think we can make it even more readable?
Comment #26
grimreaperSuggestion approved, thanks!
Comment #27
catchYes that looks much better, foreach is now an overall simplification of the code compared to how it was.
Comment #32
longwaveBackported down to 10.3.x as this seems like a low risk bug fix and unblocks some problems in contrib.
Committed and pushed 5e0ff5a872 to 11.x and 62027b5d4d to 11.0.x and 152f951114 to 10.4.x and bd6acd2ffb to 10.3.x. Thanks!
Comment #33
grimreaperThanks a lot for the merge and the backports!
Comment #35
cilefen commentedThere is a possible regression: #3478628: Fatal error: Uncaught TypeError: Drupal\Core\Extension\ThemeHandler::addTheme()
Comment #36
shane birley commentedI was in process of upgrading a Drupal 8.x website to 10.3.x and everything was going well until yesterday when I upgraded to 10.3.6. I started getting the WSOD and this error popped up:
Unsure this is 100% related but I can't find any additional references that match.
Comment #37
catchThere's an issue open for that error, and I do think it's a regression from here: #3478628: Fatal error: Uncaught TypeError: Drupal\Core\Extension\ThemeHandler::addTheme().