diff --git a/typo3/sysext/workspaces/Classes/Controller/PreviewController.php b/typo3/sysext/workspaces/Classes/Controller/PreviewController.php
index b0d232b935b4bb8a4dd320b4d0d06dff48046f12..2680ca7844ad7fde7d3ce7255f2fa5d0f7c99d69 100644
--- a/typo3/sysext/workspaces/Classes/Controller/PreviewController.php
+++ b/typo3/sysext/workspaces/Classes/Controller/PreviewController.php
@@ -18,6 +18,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\View\BackendTemplateView;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
 
 /**
  * Implements the preview controller of the workspace module.
@@ -37,13 +38,16 @@ class PreviewController extends AbstractController
     /**
      * Set up the doc header properly here
      *
-     * @param BackendTemplateView $view
+     * @param ViewInterface $view
      */
-    protected function initializeView(BackendTemplateView $view)
+    protected function initializeView(ViewInterface $view)
     {
-        parent::initializeView($view);
-        $view->getModuleTemplate()->getDocHeaderComponent()->disable();
-        $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
+        if ($view instanceof BackendTemplateView) {
+            /** @var BackendTemplateView $view */
+            parent::initializeView($view);
+            $view->getModuleTemplate()->getDocHeaderComponent()->disable();
+            $this->view->getModuleTemplate()->setFlashMessageQueue($this->controllerContext->getFlashMessageQueue());
+        }
     }
 
     /**