Skip to content
Snippets Groups Projects
Commit 65cfbc4c authored by Georg Ringer's avatar Georg Ringer Committed by Markus Klein
Browse files

[BUGFIX] Better error messages for FLUIDTEMPLATE object

When using FLUIDTEMPLATE with Typoscript "template.file = filename",
it will fail silently if filename does not point to a file.

Also check for template source when using Typoscript
"file = filename" in FLUIDTEMPLATE object.

Resolves: #65340
Releases: master
Change-Id: Id6aa148408cad14e49b65c0a9f4c7887cfb3fa16
Reviewed-on: https://review.typo3.org/37273


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: default avatarFrank Naegler <frank.naegler@typo3.org>
Reviewed-by: default avatarJoerg Boesche <typo3@joergboesche.de>
Tested-by: default avatarJoerg Boesche <typo3@joergboesche.de>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent 9c2b9b33
No related merge requests found
......@@ -21,6 +21,7 @@ use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Fluid\View\StandaloneView;
use TYPO3\CMS\Frontend\ContentObject\Exception\ContentRenderingException;
/**
* Contains FLUIDTEMPLATE class object
......@@ -162,6 +163,12 @@ class FluidTemplateContentObject extends AbstractContentObject
} elseif (!empty($conf['template']) && !empty($conf['template.'])) {
// Fetch the Fluid template by template cObject
$templateSource = $this->cObj->cObjGetSingle($conf['template'], $conf['template.']);
if ($templateSource === '') {
throw new ContentRenderingException(
'Could not find template source for ' . $conf['template'],
1437420865
);
}
$this->view->setTemplateSource($templateSource);
} else {
// Fetch the Fluid template by file stdWrap
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment