From 2f715fa211c865aa9547397236de9c3c1d556ecc Mon Sep 17 00:00:00 2001 From: Mathias Schreiber Date: Wed, 21 Feb 2018 18:46:42 +0100 Subject: [PATCH] [BUGFIX] Have ImageManipulationWizard return HTMLResponse ImageManipulationWizard now returns a proper HTMLResponse instead of a JsonResponse. Furthermore an missing import has been added in LocalizationController. Resolves: #84005 Releases: master Change-Id: Ie02cdaca84afa0c7fcde109e0fbbe5237ee69600 Reviewed-on: https://review.typo3.org/55856 Tested-by: TYPO3com Reviewed-by: Christian Kuhn Tested-by: Christian Kuhn Reviewed-by: Frans Saris Tested-by: Frans Saris --- .../Classes/Controller/Page/LocalizationController.php | 1 + .../backend/Classes/Form/Wizard/ImageManipulationWizard.php | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/typo3/sysext/backend/Classes/Controller/Page/LocalizationController.php b/typo3/sysext/backend/Classes/Controller/Page/LocalizationController.php index bc86f0a615a7..912fa706906d 100644 --- a/typo3/sysext/backend/Classes/Controller/Page/LocalizationController.php +++ b/typo3/sysext/backend/Classes/Controller/Page/LocalizationController.php @@ -21,6 +21,7 @@ use TYPO3\CMS\Backend\Utility\BackendUtility; use TYPO3\CMS\Core\DataHandling\DataHandler; use TYPO3\CMS\Core\Http\JsonResponse; +use TYPO3\CMS\Core\Http\Response; use TYPO3\CMS\Core\Imaging\Icon; use TYPO3\CMS\Core\Imaging\IconFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; diff --git a/typo3/sysext/backend/Classes/Form/Wizard/ImageManipulationWizard.php b/typo3/sysext/backend/Classes/Form/Wizard/ImageManipulationWizard.php index f4637fa68a1e..69ce4d190b80 100644 --- a/typo3/sysext/backend/Classes/Form/Wizard/ImageManipulationWizard.php +++ b/typo3/sysext/backend/Classes/Form/Wizard/ImageManipulationWizard.php @@ -17,7 +17,7 @@ use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; -use TYPO3\CMS\Core\Http\JsonResponse; +use TYPO3\CMS\Core\Http\HtmlResponse; use TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException; use TYPO3\CMS\Core\Resource\ResourceFactory; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -71,9 +71,9 @@ public function getWizardAction(ServerRequestInterface $request): ResponseInterf 'cropVariants' => $queryParams['cropVariants'] ]; $content = $this->templateView->renderSection('Main', $viewData); - return new JsonResponse($content); + return new HtmlResponse($content); } - return new JsonResponse(null, 403); + return new HtmlResponse('', 403); } /**