Drupal Version

Drupal 9.4.11
PHP 7.4.33
MySQL 5.40

Domain module version

Domain 8.x-1.0-beta8

Steps to reproduce

I only installed a module but to be precise the module is called hacked and when it finished installing the following error was displayed:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function id() on null in Drupal\domain\ContextProvider\CurrentDomainContext->getRuntimeContexts() (line 45 of modules/contrib/domain/domain/src/ContextProvider/CurrentDomainContext.php).
Drupal\domain\ContextProvider\CurrentDomainContext->getRuntimeContexts() (Line: 79)
Drupal\Core\Plugin\Context\LazyContextRepository->getRuntimeContexts() (Line: 96)
Drupal\theme_switcher\Theme\ThemeSwitcherNegotiator->applies() (Line: 67)
Drupal\Core\Theme\ThemeNegotiator->determineActiveTheme() (Line: 405)

Issue fork domain-3348153

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Nelo_Drup created an issue. See original summary.

david-b made their first commit to this issue’s fork.

pradeepjha’s picture

Version: 8.x-1.0-beta8 » 8.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new763 bytes
agentrickard’s picture

Seems like a harmless and potentially safe change.

rory downes’s picture

This patch does not apply to 2.0.0-beta2 and it appears that this issue has been solved in a different way by testing the $current_domain variable to be an instance of DomainInterface.

mably’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Needs review » Closed (works as designed)