I get the following PHP warnings when trying to access certain admin pages like the "Revisions" tab. on specific nodes.
Warning: Undefined array key "theme_key" in Drupal\switch_page_theme\Theme\PageThemeNegotiator->applies() (line 135 of modules/contrib/switch_page_theme/src/Theme/PageThemeNegotiator.php).
It appears this was introduced by: #3216203: Theme switch not applied on 403/404 pages → .
Stack trace:
Warning: Undefined array key "theme_key" in Drupal\switch_page_theme\Theme\PageThemeNegotiator->applies() (line 135 of modules/contrib/switch_page_theme/src/Theme/PageThemeNegotiator.php).
Drupal\switch_page_theme\Theme\PageThemeNegotiator->applies(Object) (Line: 67)
Drupal\Core\Theme\ThemeNegotiator->determineActiveTheme(Object) (Line: 405)
Drupal\Core\Theme\ThemeManager->initTheme(Object) (Line: 96)
Drupal\Core\Theme\ThemeManager->getActiveTheme() (Line: 133)
Drupal\Core\Theme\ThemeManager->render('username', Array) (Line: 422)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array) (Line: 117)
Drupal\entity\Controller\RevisionOverviewController->getRevisionDescription(Object, 1) (Line: 132)
Drupal\entity\Controller\RevisionOverviewController->revisionOverview(Object) (Line: 99)
Drupal\entity\Controller\RevisionOverviewController->revisionOverviewController(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 159)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 709)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Use null coalesce operator to handle cases when the array key may not exist.
From:
$condition = (
$this->currentRequestIsNotSystem403() &&
$this->currentPathConfiguredInRules($value["pages"]) &&
$this->checkThemeKey($value["theme_key"]) &&
$this->checkCorrectRoles($value['roles'])
);
To:
$condition = (
$this->currentRequestIsNotSystem403() &&
$this->currentPathConfiguredInRules($value["pages"] ?? '') &&
$this->checkThemeKey($value["theme_key"] ?? '') &&
$this->checkCorrectRoles($value['roles'] ?? [])
);
Write patch.
Fixed
3.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.