diff --git a/core/modules/system/src/Controller/BatchController.php b/core/modules/system/src/Controller/BatchController.php index 12478855e8..2e01c5bae1 100644 --- a/core/modules/system/src/Controller/BatchController.php +++ b/core/modules/system/src/Controller/BatchController.php @@ -61,18 +61,19 @@ public function batchPage(Request $request) { return $output; } elseif (isset($output)) { + $title = isset($output['#title']) ? $output['#title'] : NULL; $page = [ '#type' => 'page', - '#title' => isset($output['#title']) ? $output['#title'] : NULL, + '#title' => $title, '#show_messages' => FALSE, 'content' => $output, ]; - // Inject page title (if available). - if (isset($page['#title'])) { + // Also inject title as a page header (if available). + if ($title) { $page['header'] = [ '#type' => 'page_title', - '#title' => $page['#title'], + '#title' => $title, ]; }