diff --git a/core/modules/big_pipe/big_pipe.module b/core/modules/big_pipe/big_pipe.module index 5994de5..00e969f 100644 --- a/core/modules/big_pipe/big_pipe.module +++ b/core/modules/big_pipe/big_pipe.module @@ -33,6 +33,11 @@ function big_pipe_help($route_name, RouteMatchInterface $route_match) { * @see \Drupal\big_pipe\Controller\BigPipeController::setNoJsCookie() */ function big_pipe_page_attachments(array &$page) { + // Ignore if we are in batch. + $route_match = \Drupal::routeMatch(); + if ($route_match->getRouteName() == 'system.batch_page.html') { + return; + } $request = \Drupal::request(); // BigPipe is only used when there is an actual session, so only add the no-JS // detection when there actually is a session. @@ -51,7 +56,7 @@ function big_pipe_page_attachments(array &$page) { '#noscript' => TRUE, '#attributes' => [ 'http-equiv' => 'Refresh', - 'content' => '0; URL=' . Url::fromRoute('big_pipe.nojs', [], ['query' => \Drupal::service('redirect.destination')->getAsArray()])->toString(), + 'content' => '0; URL=' . Url::fromUri('internal:/big_pipe/no-js', ['query' => \Drupal::service('redirect.destination')->getAsArray()])->toString(), ], ], 'big_pipe_detect_nojs',