diff --git a/Classes/Module/NewTenant.php b/Classes/Module/NewTenant.php index 9517f01f..05f7ff85 100644 --- a/Classes/Module/NewTenant.php +++ b/Classes/Module/NewTenant.php @@ -14,7 +14,7 @@ namespace Kitodo\Dlf\Module; use Psr\Http\Message\ResponseInterface; use Kitodo\Dlf\Common\Helper; -use TYPO3\CMS\Core\Http\HtmlResponse; +use TYPO3\CMS\Core\Http\Response; use TYPO3\CMS\Core\Database\ConnectionPool; use TYPO3\CMS\Core\Utility\GeneralUtility; @@ -180,6 +180,9 @@ class NewTenant extends \Kitodo\Dlf\Common\AbstractModule */ public function main(\Psr\Http\Message\ServerRequestInterface $request): ResponseInterface { + /** @var Response $response */ + $response = GeneralUtility::makeInstance(Response::class); + // Initialize module. $this->MCONF = [ 'name' => 'tools_dlfNewTenantModule', @@ -199,8 +202,9 @@ class NewTenant extends \Kitodo\Dlf\Common\AbstractModule \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR ); $this->markerArray['CONTENT'] .= Helper::renderFlashMessages(); - return new HtmlResponse($this->printContent()); - } + $response->getBody()->write($this->printContent()); + return $response; + } // Should we do something? if (!empty($this->CMD)) { // Sanitize input... @@ -322,6 +326,7 @@ class NewTenant extends \Kitodo\Dlf\Common\AbstractModule // TODO: Ă„ndern! $this->markerArray['CONTENT'] .= 'You are not allowed to access this page or have not selected a page, yet.'; } - return new HtmlResponse($this->printContent()); + $response->getBody()->write($this->printContent()); + return $response; } } diff --git a/ext_tables.php b/ext_tables.php index eb92ae38..fc0470b3 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -23,7 +23,12 @@ if (\TYPO3_MODE === 'BE') { 'name' => 'tools_dlfNewTenantModule', 'icon' => 'EXT:dlf/Resources/Public/Icons/Extension.svg', 'labels' => 'LLL:EXT:dlf/Resources/Private/Language/NewTenant.xml', - 'navigationComponentId' => 'TYPO3/CMS/Backend/PageTree/PageTreeElement' + /** + * 'navigationComponentId' => 'typo3-pagetree' is marked deprecated + * in TYPO3 9. Use 'TYPO3/CMS/Backend/PageTree/PageTreeElement' + * instead. Keeping old setting for compatibility with TYPO3 8.7. + */ + 'navigationComponentId' => 'typo3-pagetree' ] ); }