Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you only have 1 language enabled together with the translation modules and then you activate the URL interface text language detection (Detection and selection), you get the following error:
TypeError: Argument 1 passed to Drupal\language\LanguageNegotiationMethodBase::setCurrentUser() must implement interface Drupal\Core\Session\AccountInterface
This seems to be because the LanguageSwitchLinks are disabled in this case, only on some admin pages.
I suggest to disable the alternate hreflang feature on admin pages to avoid this issue. Admin pages do not need to have a hreflang anyhow.
Comment | File | Size | Author |
---|---|---|---|
#2 | hreflang-typeerror-2821038-1-8.1.x.patch | 727 bytes | hoebekewim |
Comments
Comment #2
hoebekewim CreditAttribution: hoebekewim as a volunteer commentedSuggested patch
Comment #4
mfbThanks for reporting