diff --git a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php index a54454ebd5..7e208f497b 100644 --- a/src/lib/MVC/Symfony/Controller/Content/PreviewController.php +++ b/src/lib/MVC/Symfony/Controller/Content/PreviewController.php @@ -71,7 +71,7 @@ public function __construct( AuthorizationCheckerInterface $authorizationChecker, PreviewLocationProvider $locationProvider, CustomLocationControllerChecker $controllerChecker, - bool $debugMode, + bool $debugMode = false, ?LoggerInterface $logger = null ) { $this->contentService = $contentService; @@ -212,9 +212,9 @@ private function buildResponseForGenericPreviewError(Location $location, Content try { if ($location->isDraft() && $this->controllerChecker->usesCustomController($content, $location)) { $message = <<The view that rendered this location draft uses a custom controller, and resulted in a fatal error.

-

Location View is deprecated, as it causes issues with preview, such as an empty location id when previewing the first version of a content.

-EOF; +

The view that rendered this location draft uses a custom controller, and resulted in a fatal error.

+

Location View is deprecated, as it causes issues with preview, such as an empty location id when previewing the first version of a content.

+ EOF; } } catch (Exception $innerException) { $message = 'An exception occurred when handling page preview exception';