Argument #9 ($kernel) must be of type ?

Created on 5 June 2024, 22 days ago
Updated 21 June 2024, 6 days ago

Problem/Motivation

After upgrading to Core 10.3.0-rc1 I get the following error:

TypeError: Drupal\Core\Theme\Registry::__construct(): Argument #9 ($kernel) must be of type ?Symfony\Component\HttpKernel\HttpKernelInterface, string given, called in /var/www/html/web/themes/contrib/bootstrap/src/Plugin/Alter/ThemeRegistry.php on line 44 in Drupal\Core\Theme\Registry->__construct() (line 188 of core/lib/Drupal/Core/Theme/Registry.php).

Output log:

#0 /var/www/html/web/themes/contrib/bootstrap/src/Plugin/Alter/ThemeRegistry.php(44): Drupal\Core\Theme\Registry->__construct('/var/www/html/w...', Object(Drupal\Core\Cache\DatabaseBackend), Object(Drupal\Core\ProxyClass\Lock\DatabaseLockBackend), Object(Drupal\Core\Extension\ModuleHandler), Object(Drupal\Core\Extension\ThemeHandler), Object(Drupal\Core\Theme\ThemeInitialization), Object(Drupal\Core\Cache\ChainedFastBackend), Object(Drupal\Core\Extension\ModuleExtensionList), 'swatek_bucko')
#1 /var/www/html/web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php(25): Drupal\bootstrap\Plugin\Alter\ThemeRegistry->__construct(Array, 'theme_registry', Array)
#2 /var/www/html/web/core/lib/Drupal/Component/Plugin/PluginManagerBase.php(83): Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('theme_registry', Array)
#3 /var/www/html/web/themes/contrib/bootstrap/src/Plugin/PluginManager.php(84): Drupal\Component\Plugin\PluginManagerBase->createInstance('theme_registry', Array)
#4 /var/www/html/web/themes/contrib/bootstrap/src/Bootstrap.php(302): Drupal\bootstrap\Plugin\PluginManager->createInstance('theme_registry', Array)
#5 /var/www/html/web/themes/contrib/bootstrap/bootstrap.theme(139): Drupal\bootstrap\Bootstrap::alter('bootstrap_theme...', Array, NULL, NULL)
#6 /var/www/html/web/core/lib/Drupal/Core/Theme/ThemeManager.php(458): bootstrap_theme_registry_alter(Array, NULL, NULL)
#7 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(433): Drupal\Core\Theme\ThemeManager->alterForTheme(Object(Drupal\Core\Theme\ActiveTheme), 'theme_registry', Array)
#8 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(281): Drupal\Core\Theme\Registry->build()
#9 /var/www/html/web/core/lib/Drupal/Core/Utility/ThemeRegistry.php(88): Drupal\Core\Theme\Registry->get()
#10 /var/www/html/web/core/lib/Drupal/Core/Utility/ThemeRegistry.php(69): Drupal\Core\Utility\ThemeRegistry->initializeRegistry()
#11 /var/www/html/web/core/lib/Drupal/Core/Theme/Registry.php(319): Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:...', Object(Drupal\Core\Cache\ChainedFastBackend), Object(Drupal\Core\ProxyClass\Lock\DatabaseLockBackend), Array, true)
#12 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(194): Drupal\Core\Theme\Registry->getRuntime()
#13 /var/www/html/web/core/modules/node/src/NodeViewBuilder.php(61): Drupal\Core\Entity\EntityViewBuilder->getBuildDefaults(Object(Drupal\node\Entity\Node), 'full')
#14 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(157): Drupal\node\NodeViewBuilder->getBuildDefaults(Object(Drupal\node\Entity\Node), 'full')
#15 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(123): Drupal\Core\Entity\EntityViewBuilder->viewMultiple(Array, 'full', NULL)
#16 /var/www/html/web/core/lib/Drupal/Core/Entity/Controller/EntityViewController.php(134): Drupal\Core\Entity\EntityViewBuilder->view(Object(Drupal\node\Entity\Node), 'full')
#17 /var/www/html/web/core/modules/node/src/Controller/NodeViewController.php(66): Drupal\Core\Entity\Controller\EntityViewController->view(Object(Drupal\node\Entity\Node), 'full')
#18 [internal function]: Drupal\node\Controller\NodeViewController->view(Object(Drupal\node\Entity\Node), 'full', NULL)
#19 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array)
#20 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#21 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure))
#22 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array)
#23 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#24 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1)
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#26 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#27 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#28 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#29 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#30 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#31 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#32 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#33 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#34 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true)
#35 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request))
#36 {main}

πŸ› Bug report
Status

Fixed

Version

3.30

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Adrianm6254

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Adrianm6254
  • First commit to issue fork.
  • Merge request !41Resolve #3452819 "Argument 9 kernel" β†’ (Merged) created by hosterholz
  • Pipeline finished with Success
    22 days ago
    Total: 147s
    #192542
  • πŸ‡ΊπŸ‡ΈUnited States Adrianm6254

    I applied MR !41 and the error is gone.

    Thanks!

  • Status changed to RTBC 7 days ago
  • πŸ‡΅πŸ‡ΉPortugal jcnventura

    This fixed the theme for me in Drupal core 10.3.0. Please commit.

  • πŸ‡¨πŸ‡¦Canada dadderley Vancouver

    Just upgrades a small site to drupal 10.3.0
    I am using Bootstrap 8.x-3.30 as a base theme.

    The result is WSOD

    34184   20/Jun 22:04   php      Error      TypeError: Drupal\Core\Theme\Registry::__construct(): Argument #9
                                                 ($kernel) must be of type
                                                 ?Symfony\Component\HttpKernel\HttpKernelInterface, string given, called
                                                 in /home/customer/www/da
    

    Is there a new release coming?

  • πŸ‡§πŸ‡ΎBelarus f1mishutka Minsk

    With release of 10.3.0 this issue became critical show stopper. Could we have it released ASAP please?

    Thanks!

  • πŸ‡¬πŸ‡§United Kingdom Biren

    I experience the same with Drupal 10.3.0. The new release is needed immediately.

  • Same issue. Updated Drupal site from 10.1.8 to 10.3 today.

  • πŸ‡¦πŸ‡ΉAustria drupalfan2

    Because we do not get the new release, I generated this patch file.

  • πŸ‡΅πŸ‡ΉPortugal jcnventura
  • πŸ‡·πŸ‡ΊRussia pick_d

    Had the same issue with 10.3.0 Drupal core release.
    However, the patch from #10 fixed it for me. Thanks.

  • Pipeline finished with Skipped
    7 days ago
    #204901
  • First commit to issue fork.
  • πŸ‡¨πŸ‡¦Canada dadderley Vancouver

    Well, that was quick!

    Installed the new dev release

    public_html$ composer require 'drupal/bootstrap:3.x-dev@dev'
    ./composer.json has been updated
    Running composer update drupal/bootstrap
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 0 installs, 1 update, 0 removals
      - Upgrading drupal/bootstrap (3.30.0 => dev-3.x f47794c)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 0 installs, 1 update, 0 removals
      - Syncing drupal/bootstrap (dev-3.x f47794c) into cache
      - Removing drupal/bootstrap (3.30.0)
      - Installing drupal/bootstrap (dev-3.x f47794c): Cloning f47794c3f8 from cache
    Generating autoload files
    Hardening vendor directory with .htaccess and web.config files.
    51 packages you are using are looking for funding.
    Use the `composer fund` command to find out more!
    Cleaning installed packages.
    No security vulnerability advisories found

    Proceeded to update to Drupal 10.3.0
    All is well.

    Thankyou

  • Status changed to Fixed 6 days ago
  • πŸ‡ΊπŸ‡ΈUnited States shelane

    Full release coming soon. I'm checking other issues to see if there is anything else that should go in the release.

  • πŸ‡ΊπŸ‡ΈUnited States Chris Matthews

    Thank you all for the quick turnaround. I rolled back to 10.2.7 for now.

Production build 0.69.0 2024