Issue Bug Closed

#95481Configuring custom PageRenderer template can throw exception

Chris Müller 10/05/21, 19:22 updated 10/04/22, 14:12

Description

I have an own PageRenderer template and configured it in TypoScript:

config {
  pageRendererTemplateFile = EXT:site/Resources/Private/Templates/PageRenderer.html
}

It is stored under “Resources/Private” (should not be available from outside). Now I am getting the error:

#1630089406 RuntimeException
Resource paths must start with "EXT:" and must reference Resources/Public
in /var/www/html/public/typo3/sysext/core/Classes/Utility/PathUtility.php line 100

at TYPO3\CMS\Core\Utility\PathUtility::getPublicResourceWebPath('EXT:site/Resources/Private/Templates/PageRenderer.html', false)
in /var/www/html/public/typo3/sysext/frontend/Classes/Resource/FilePathSanitizer.php line 82

at TYPO3\CMS\Frontend\Resource\FilePathSanitizer->sanitize('EXT:site/Resources/Private/Templates/PageRenderer.html')
in /var/www/html/public/typo3/sysext/frontend/Classes/Http/RequestHandler.php line 244

at TYPO3\CMS\Frontend\Http\RequestHandler->processHtmlBasedRenderingSettings(object(TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController), object(TYPO3\CMS\Core\Site\Entity\SiteLanguage), object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/frontend/Classes/Http/RequestHandler.php line 187

at TYPO3\CMS\Frontend\Http\RequestHandler->generatePageContent(object(TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController), object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/frontend/Classes/Http/RequestHandler.php line 140

at TYPO3\CMS\Frontend\Http\RequestHandler->handle(object(TYPO3\CMS\Core\Http\ServerRequest))
in /var/www/html/public/typo3/sysext/core/Classes/Middleware/ResponsePropagation.php line 34

...

Of course, I can store it under “Resources/Public”, but IMHO it shouldn’t be stored there.

Reviews 2