diff --git a/src/Controller/FacetBlockAjaxController.php b/src/Controller/FacetBlockAjaxController.php --- a/src/Controller/FacetBlockAjaxController.php (revision 297bc08b8054da8d20b728bcca3f6f0028e1819e) +++ b/src/Controller/FacetBlockAjaxController.php (date 1723051123353) @@ -13,6 +13,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\RouterInterface; @@ -132,10 +134,18 @@ $new_request = Request::create($path); $request_stack = new RequestStack(); + $session = new Session(new MockArraySessionStorage()); + $session->start(); + $new_request->setSession($session); + $processed = $this->pathProcessor->processInbound($path, $new_request); $processed_request = Request::create($processed); + $session = new Session(new MockArraySessionStorage()); + $session->start(); + $processed_request->setSession($session); + $this->currentPath->setPath($processed_request->getPathInfo()); $request->attributes->add($this->router->matchRequest($new_request)); $this->currentRouteMatch->resetRouteMatch(); diff --git a/src/Plugin/facets/url_processor/QueryString.php b/src/Plugin/facets/url_processor/QueryString.php --- a/src/Plugin/facets/url_processor/QueryString.php (revision 297bc08b8054da8d20b728bcca3f6f0028e1819e) +++ b/src/Plugin/facets/url_processor/QueryString.php (date 1723051228741) @@ -14,6 +14,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\Session; +use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage; /** * Query string URL processor. @@ -281,6 +283,11 @@ } $request = Request::create($facet_source_path); + + $session = new Session(new MockArraySessionStorage()); + $session->start(); + $request->setSession($session); + $request->attributes->set('_format', $this->request->get('_format')); $requestsByPath[$facet_source_path] = $request; return $request;