Problem/Motivation

The following error is triggered when visiting the /taxonomy/term/%/feed path provided by views.view.taxonomy_term:

TypeError: Drupal\language\LanguageNegotiationMethodBase::setCurrentUser(): Argument #1 ($current_user) must be of type Drupal\Core\Session\AccountInterface, null given, called in /[..]/web/core/modules/language/src/LanguageNegotiator.php on line 229 in Drupal\language\LanguageNegotiationMethodBase->setCurrentUser() (line 52 of /[..]/web/core/modules/language/src/LanguageNegotiationMethodBase.php).

Drupal\Component\DependencyInjection\Container->createService(Array, 'language_cookie.language_cookie_subscriber') (Line: 173)
Drupal\Component\DependencyInjection\Container->get('language_cookie.language_cookie_subscriber', 1) (Line: 453)
Drupal\Component\DependencyInjection\Container->{closure:Drupal\Component\DependencyInjection\Container::resolveServicesAndParameters():452}() (Line: 243)
Symfony\Component\EventDispatcher\EventDispatcher::{closure:Symfony\Component\EventDispatcher\EventDispatcher::optimizeListeners():241}(Object, 'kernel.response', Object) (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners(Array, 'kernel.response', Object) (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch(Object, 'kernel.response') (Line: 216)
Symfony\Component\HttpKernel\HttpKernel->filterResponse(Object, Object, 1) (Line: 162)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 30)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->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: 61)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 753)
Drupal\Core\DrupalKernel->handle(Object) (Line: 34)
Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (Line: 32)
require('/[..]/vendor/autoload_runtime.php') (Line: 22)
require_once('/[..]/web/autoload_runtime.php') (Line: 13)
require('/[..]/web/index.php') (Line: 110)

Not sure if the issue is specifically related to that view, but that's where we noticed it.

Proposed resolution

Call $this->languageNegotiator->setCurrentUser($this->currentUser);.

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

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Status: Active » Needs review