Cannot run update.php

Created on 10 July 2024, 5 months ago

Problem/Motivation

Since 10.3 update, can not run update.php - receive this error:

TypeError: array_diff(): Argument #2 must be of type array, null given in array_diff() (line 702 of core/lib/Drupal/Core/Theme/Registry.php).

array_diff(Array, NULL) (Line: 702)
Drupal\Core\Theme\Registry->mergePreprocessFunctions('block__system_menu_block__main', 'block', Array, Array) (Line: 677)
Drupal\Core\Theme\Registry->completeSuggestion('block__system_menu_block__main', Array) (Line: 791)
Drupal\Core\Theme\Registry->postProcessExtension(Array, Object) (Line: 161)
Drupal\bootstrap\Plugin\Alter\ThemeRegistry->alter(Array, NULL, NULL) (Line: 303)
Drupal\bootstrap\Bootstrap::alter('bootstrap_theme_registry_alter', Array, NULL, NULL) (Line: 139)
bootstrap_theme_registry_alter(Array, NULL, NULL) (Line: 458)
Drupal\Core\Theme\ThemeManager->alterForTheme(Object, 'theme_registry', Array) (Line: 433)
Drupal\Core\Theme\Registry->build() (Line: 274)
Drupal\Core\Theme\Registry->get() (Line: 88)
Drupal\Core\Utility\ThemeRegistry->initializeRegistry() (Line: 69)
Drupal\Core\Utility\ThemeRegistry->__construct('theme_registry:runtime:sub_theme', Object, Object, Array, 1) (Line: 319)
Drupal\Core\Theme\Registry->getRuntime() (Line: 141)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 491)
Drupal\Core\Render\Renderer->doRender(Array, 1) (Line: 248)
Drupal\Core\Render\Renderer->render(Array, 1) (Line: 153)
Drupal\Core\Render\Renderer->Drupal\Core\Render\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 152)
Drupal\Core\Render\Renderer->renderRoot(Array) (Line: 66)
Drupal\Core\Render\BareHtmlPageRenderer->renderBarePage(Array, Object, 'maintenance_page', Array) (Line: 76)
Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer->renderBarePage(Array, Object, 'maintenance_page', Array) (Line: 205)
Drupal\system\Controller\DbUpdateController->handle('info', Object)
call_user_func_array(Array, Array) (Line: 115)
Drupal\Core\Update\UpdateKernel->handleRaw(Object) (Line: 76)
Drupal\Core\Update\UpdateKernel->handle(Object) (Line: 27)

I resolved by removing both block__system_menu_block__main.html.twig and block__system_menu_block__account.html.twig template files. Unsure of the underlying issue.

Possible solution to https://www.drupal.org/project/bootstrap/issues/3452819 🐛 Argument #9 ($kernel) must be of type ? Fixed #19.

🐛 Bug report
Status

Active

Version

3.31

Component

Theme Registry

Created by

🇳🇿New Zealand derekthatcher Christchurch

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024