Loading src/Controller/FacetBlockAjaxController.php +11 −2 Original line number Diff line number Diff line Loading @@ -6,13 +6,14 @@ use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\InvokeCommand; use Drupal\Core\Ajax\ReplaceCommand; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Http\RequestStack as DrupalRequestStack; use Drupal\Core\Path\CurrentPathStack; use Drupal\Core\PathProcessor\PathProcessorManager; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Routing\CurrentRouteMatch; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\RequestStack as SymfonyRequestStack; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\RouterInterface; Loading Loading @@ -126,7 +127,15 @@ class FacetBlockAjaxController extends ControllerBase { $facets_blocks = array_unique($facets_blocks); $new_request = Request::create($path); $request_stack = new RequestStack(); // Support 9.3+ // @todo remove after 9.3 or greater is required. if (class_exists(DrupalRequestStack::class)) { $request_stack = new DrupalRequestStack(); } // Legacy request stack. else { $request_stack = new SymfonyRequestStack(); } $processed = $this->pathProcessor->processInbound($path, $new_request); $this->currentPath->setPath($processed); Loading Loading
src/Controller/FacetBlockAjaxController.php +11 −2 Original line number Diff line number Diff line Loading @@ -6,13 +6,14 @@ use Drupal\Core\Ajax\AjaxResponse; use Drupal\Core\Ajax\InvokeCommand; use Drupal\Core\Ajax\ReplaceCommand; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Http\RequestStack as DrupalRequestStack; use Drupal\Core\Path\CurrentPathStack; use Drupal\Core\PathProcessor\PathProcessorManager; use Drupal\Core\Render\RendererInterface; use Drupal\Core\Routing\CurrentRouteMatch; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\HttpFoundation\RequestStack as SymfonyRequestStack; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Routing\RouterInterface; Loading Loading @@ -126,7 +127,15 @@ class FacetBlockAjaxController extends ControllerBase { $facets_blocks = array_unique($facets_blocks); $new_request = Request::create($path); $request_stack = new RequestStack(); // Support 9.3+ // @todo remove after 9.3 or greater is required. if (class_exists(DrupalRequestStack::class)) { $request_stack = new DrupalRequestStack(); } // Legacy request stack. else { $request_stack = new SymfonyRequestStack(); } $processed = $this->pathProcessor->processInbound($path, $new_request); $this->currentPath->setPath($processed); Loading