- 🇺🇸United States smustgrave
Actually noticed this bug while prepping a site for D10
@trigger_error('Calling ' . __METHOD__ . ' without the $extension_list_theme argument is deprecated in drupal:9.4.0 and will be required in drupal:10.0.0
1. Should be updated for 10.1.x and 11 now I think.
Testing out the functionality by editing a contrib theme I'm using to base theme off stark.
Before installing I exported my config
Installed theme which installed stark
Ran config import and got the errorApplied fix
Ran config import and both uninstalled.So this looks good just needs that 1 update.
- Status changed to Needs review
almost 2 years ago 8:23pm 27 January 2023 - Status changed to RTBC
almost 2 years ago 9:55pm 27 January 2023 - 🇬🇧United Kingdom catch
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -448,9 +463,24 @@ protected function createExtensionChangelist() { + // Set the actual module weights.
Should this say theme weights?
Also is there no API method for that anywhere?
- 🇬🇧United Kingdom alexpott 🇪🇺🌍
Yes it should say theme weights... it's about setting them in the array we're creating to do the ordering... so it's not setting the theme weights in the system... will fix this to be clearer. It's a copy/pasta so fixing it above too.
Leaving at RTBC as this is only fixing a comment as @catch requested.
- 🇬🇧United Kingdom catch
@alexpott found 📌 Provide canonical extension sorting by dependencies in the extension system Active which covers my remaining concern here, which was apparently a remaining concern on a similar issue 9 years ago.
Committed/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!
- Status changed to Fixed
almost 2 years ago 11:00am 30 January 2023 - Status changed to RTBC
almost 2 years ago 3:56pm 30 January 2023 - 🇬🇧United Kingdom alexpott 🇪🇺🌍
I agree that we should fix this in 9.5 and 10.0 so here's a patch to remove the deprecation message as we should only be adding them in 10.1
- 🇬🇧United Kingdom alexpott 🇪🇺🌍
I agree that we should fix this in 9.5 and 10.0 so here's a patch to remove the deprecation message as we should only be adding them in 10.1
- Status changed to Fixed
almost 2 years ago 4:12pm 30 January 2023 - 🇬🇧United Kingdom catch
Hmm fair enough, this is the tricky thing about best effort bc vs. backporting bugfixes with internal API changes. Committed/pushed to 10.0.x and 9.5.x, thanks! I don't think anyone's going to be overriding either class so hopefully this is moot.
- Status changed to Needs work
almost 2 years ago 9:53pm 30 January 2023 - 🇦🇺Australia larowlan 🇦🇺🏝.au GMT+10
Just a couple of micronits
-
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -166,6 +167,13 @@ class ConfigImporter { + protected $themeExtensionList; +++ b/core/modules/config/src/Form/ConfigSingleImportForm.php @@ -104,6 +105,13 @@ class ConfigSingleImportForm extends ConfirmFormBase { + protected $themeExtensionList; +++ b/core/modules/config/src/Form/ConfigSync.php @@ -121,6 +122,13 @@ class ConfigSync extends FormBase { + protected $themeExtensionList;
Let's add a property type-hint here for the D10 version.
-
+++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -448,9 +463,24 @@ protected function createExtensionChangelist() { + // Set the actual module weights.
%s/module/theme
-
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php @@ -687,6 +687,37 @@ public function testRequiredModuleValidation() { + * Tests installing a base themes and sub themes during configuration import.
%s/base themes/base theme
-
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigImporterTest.php @@ -687,6 +687,37 @@ public function testRequiredModuleValidation() { + $this->assertTrue($this->container->get('theme_handler')->themeExists('test_basetheme')); + $this->assertTrue($this->container->get('theme_handler')->themeExists('test_subsubtheme')); + $this->assertTrue($this->container->get('theme_handler')->themeExists('test_subtheme')); ... + $this->assertFalse($this->container->get('theme_handler')->themeExists('test_basetheme')); + $this->assertFalse($this->container->get('theme_handler')->themeExists('test_subsubtheme')); + $this->assertFalse($this->container->get('theme_handler')->themeExists('test_subtheme'));
micronit: is it worth putting the theme_handler service into a local variable ?
would probably need to assign it twice to allow for any container rebuild as a result of updating core.extension
-
- Status changed to Fixed
almost 2 years ago 9:55pm 30 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
about 1 year ago 9:57am 8 September 2023