Drupal maintenance page - TypeError: Argument 1 passed to Drupal\Core\Extension\ThemeHandler::addTheme() must be an instance of Drupal\Core\Extension\Extension, null given

Created on 9 June 2021, over 3 years ago
Updated 28 July 2024, 5 months ago

Problem/Motivation

When Drupal is set to maintenance mode, the following fatal error occurs:
TypeError: Argument 1 passed to Drupal\Core\Extension\ThemeHandler::addTheme() must be an instance of Drupal\Core\Extension\Extension, null given

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

💬 Support request
Status

Closed: outdated

Version

11.0 🔥

Component
Extension 

Last updated 6 days ago

No maintainer
Created by

fathima.asmat London, UK

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇹Austria nofue

    @cilefen is right with #12: watch that setting before patching stuff.

  • 🇦🇺Australia pameeela

    Nothing has been provided to indicate this is a core bug, sounds like a misconfiguration issue, so I am updating this to a support request. No activity lately so can probably close if no further updates in the next few months.

  • 🇦🇺Australia noonoos

    I am having this issue as well on core 10.3. After update of better exposed filters to version 7.0.0-beta1 composer removed the following modules withe the following error after drush updb
    Currently using Missing or invalid modules The following modules are marked as installed in the core.extension
    configuration, but they are missing:
    * jquery_ui_datepicker
    * jquery_ui_slider
    * jquery_ui_touch_punch

    Requirements check reports errors. Do you wish to continue? (yes/no) [yes]:
    >

    [success] No pending updates.
    [warning] Undefined array key "bartik" theme.maintenance.inc:70
    [error] TypeError: Drupal\Core\Extension\ThemeHandler::addTheme(): Argument #1 ($theme) must be of type Drupal\Core\Extension\Extension, null given, called in /var/www/html/web/core/includes/theme.maintenance.inc on line 70 in Drupal\Core\Extension\ThemeHandler->addTheme() (line 82 of /var/www/html/web/core/lib/Drupal/Core/Extension/ThemeHandler.php) #0 /var/www/html/web/core/includes/theme.maintenance.inc(70): Drupal\Core\Extension\ThemeHandler->addTheme(NULL)
    #1 /var/www/html/web/core/includes/bootstrap.inc(324): _drupal_maintenance_theme()
    #2 /var/www/html/web/core/includes/common.inc(492): drupal_maintenance_theme()
    #3 /var/www/html/vendor/drush/drush/src/Commands/core/UpdateDBCommands.php(87): drupal_flush_all_caches()
    #4 [internal function]: Drush\Commands\core\UpdateDBCommands->updatedb(Array)
    #5 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array(Array, Array)
    #6 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback(Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #7 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter(Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #8 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(391): Consolidation\AnnotatedCommand\CommandProcessor->process(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, Array, Object(Consolidation\AnnotatedCommand\CommandData))
    #9 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #10 /var/www/html/vendor/symfony/console/Application.php(1096): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #11 /var/www/html/vendor/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(Consolidation\AnnotatedCommand\AnnotatedCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #12 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #13 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #14 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun(Array, Object(Symfony\Component\Console\Output\ConsoleOutput))
    #15 /var/www/html/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run(Array)
    #16 /var/www/html/vendor/drush/drush/drush(4): require('/var/www/html/v...')
    #17 /var/www/html/vendor/bin/drush(119): include('/var/www/html/v...')
    #18 {main}.

    message is repeated again followed by

    TypeError: Drupal\Core\Extension\ThemeHandler::addTheme(): Argument #1 ($theme) must be of type Drupal\Core\Extension\Extension, null given, called in /var/www/html/web/core/includes/theme.maintenance.inc on line 70 in Drupal\Core\Extension\ThemeHandler->addTheme() (line 82 of /var/www/html/web/core/lib/Drupal/Core/Extension/ThemeHandler.php).
    [warning] Drush command terminated abnormally.
    Failed to run drush updb: exit status 1

    Attempting to delete the missing modules

    drush config-delete core.extension.jquery_ui_datepicker
    [error] Config core.extension.jquery_ui_datepicker does not exist
    Failed to run drush config-delete core.extension.jquery_ui_datepicker: exit status 1

  • Status changed to Closed: outdated 5 months ago
Production build 0.71.5 2024