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)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | error-after-to-install-other-module-current-domain-3348153-4.patch | 763 bytes | pradeepjha |
Issue fork domain-3348153
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
Comment #4
pradeepjha commentedComment #5
agentrickardSeems like a harmless and potentially safe change.
Comment #6
rory downes commentedThis 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.
Comment #7
mably commented