No error message at all. Confirmed in 6.2.9 and 7.2.
I think I've found the error.
This function is from FluidTemplateContentObject.php, where $templateSource will evaluate to empty string if not found.
/**
* Set template
*
* @param array $conf With possibly set file resource
* @return void
* @throws \InvalidArgumentException
*/
protected function setTemplate(array $conf) {
// Fetch the Fluid template
if (!empty($conf['template']) && !empty($conf['template.'])) {
$templateSource = $this->cObj->cObjGetSingle($conf['template'], $conf['template.']);
// $templateSource is empty string, should be NULL?
$this->view->setTemplateSource($templateSource);
} else {
$file = isset($conf['file.']) ? $this->cObj->stdWrap($conf['file'], $conf['file.']) : $conf['file'];
/** @var $templateService \TYPO3\CMS\Core\TypoScript\TemplateService */
$templateService = $GLOBALS['TSFE']->tmpl;
$templatePathAndFilename = $templateService->getFileName($file);
$this->view->setTemplatePathAndFilename(PATH_site . $templatePathAndFilename);
}
}
But here in StandaloneView.php, $templateSource must be NULL to throw an error:
/**
* Returns the Fluid template source code
*
* @param string $actionName Name of the action. This argument is not used in this view!
* @return string Fluid template source
* @throws InvalidTemplateResourceException
*/
protected function getTemplateSource($actionName = NULL) {
if ($this->templateSource === NULL && $this->templatePathAndFilename === NULL) {
throw new InvalidTemplateResourceException('No template has been specified. Use either setTemplateSource() or setTemplatePathAndFilename().', 1288085266);
}
if ($this->templateSource === NULL) { // Also check for empty string here?
if (!is_file($this->templatePathAndFilename)) {
throw new InvalidTemplateResourceException('Template could not be found at "' . $this->templatePathAndFilename . '".', 1288087061);
}
$this->templateSource = file_get_contents($this->templatePathAndFilename);
}
return $this->templateSource;
}
Additionally, one could check for errors directly in setTemplate(), to fail as early as possible.