diff --git a/core/lib/Drupal/Core/Controller/HtmlPageController.php b/core/lib/Drupal/Core/Controller/HtmlPageController.php index 222e1c3..77e39c5 100644 --- a/core/lib/Drupal/Core/Controller/HtmlPageController.php +++ b/core/lib/Drupal/Core/Controller/HtmlPageController.php @@ -58,7 +58,8 @@ public function content(Request $request, $_content) { '#title' => '', ); } - if (empty($page_content['#title']) && $request->attributes->has('_title')) { + // If no title was specified, allow to override it via the request. + if ((!isset($page_content['#title']) || $page_content['#title'] === '') && $request->attributes->has('_title')) { $page_content['#title'] = $request->attributes->get('_title'); }