#108260Fluid error, if compiled template starts with a number
Description
Hi,
Commit: 82c1f177dfd003e61f39f083383e91390b4ea945
Date: Fri Nov 21 16:16:34 2025 +0100
I have following TypoScript:
page.10 = PAGEVIEW
page.10 {
paths {
100 = EXT:site_package/Resources/Private/Templates/
}
variables {
content < styles.content.get
feature = FLUIDTEMPLATE
feature {
file = EXT:site_package/Resources/Private/Templates/Feature/92760-DateViewHelper.html
}
}
}
The template will be rendered correct uncached.
After reloading the same page (cached) I get following error:
(1/1) ParseError
syntax error, unexpected integer "92760", expecting identifier
in /var/www/html/typo3temp/var/cache/code/fluid_template/92760_DateViewHelper_html_a138a1495b020d75.php line 2
<?php
class 92760_DateViewHelper_html_a138a1495b020d75 extends \TYPO3Fluid\Fluid\Core\Compiler\AbstractCompiledTemplate {
public function getLayoutName(\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext): ?string {
return (string)'';
}
public function hasLayout(): bool {
at TYPO3\CMS\Core\Cache\Backend\SimpleFileBackend->requireOnce()
in /var/www/html/typo3/sysext/core/Classes/Cache/Frontend/PhpFrontend.php line 70
$backend = $this->getBackend();
if (!($backend instanceof PhpCapableBackendInterface)) {
throw new \RuntimeException('Can not require: Not a PhpCapableBackendInterface', 1763660480);
}
return $backend->requireOnce($entryIdentifier);
}
/**
* Loads PHP code from the cache and require() it right away. Note require()
at TYPO3\CMS\Core\Cache\Frontend\PhpFrontend->requireOnce()
in /var/www/html/typo3/sysext/fluid/Classes/Core/Cache/FluidTemplateCache.php line 45
* @param string $entryIdentifier
*/
public function get($entryIdentifier): mixed
{
return $this->requireOnce($entryIdentifier);
}
/**
* @param string $entryIdentifier
at TYPO3\CMS\Fluid\Core\Cache\FluidTemplateCache->get()
in /var/www/html/vendor/typo3fluid/fluid/src/Core/Compiler/TemplateCompiler.php line 79
if (!$this->renderingContext->isCacheEnabled()) {
return false;
}
if (!empty($identifier)) {
return (bool)$this->renderingContext->getCache()->get($identifier);
}
return false;
}
at TYPO3Fluid\Fluid\Core\Compiler\TemplateCompiler->has()
in /var/www/html/vendor/typo3fluid/fluid/src/Core/Parser/TemplateParser.php line 149
{
$compiler = $this->renderingContext->getTemplateCompiler();
if (isset($this->parsedTemplates[$templateIdentifier])) {
$parsedTemplate = $this->parsedTemplates[$templateIdentifier];
} elseif ($compiler->has($templateIdentifier)) {
$parsedTemplate = $compiler->get($templateIdentifier);
if ($parsedTemplate instanceof UncompilableTemplateInterface) {
$parsedTemplate = $this->parseTemplateSource($templateIdentifier, $templateSourceClosure);
}
at TYPO3Fluid\Fluid\Core\Parser\TemplateParser->getOrParseAndStoreTemplate()
in /var/www/html/vendor/typo3fluid/fluid/src/View/AbstractTemplateView.php line 378
$templatePaths = $renderingContext->getTemplatePaths();
$templateParser = $renderingContext->getTemplateParser();
$controllerName = $renderingContext->getControllerName();
$actionName = $renderingContext->getControllerAction();
$parsedTemplate = $templateParser->getOrParseAndStoreTemplate(
$templatePaths->getTemplateIdentifier($controllerName, $actionName),
function ($parent, TemplatePaths $paths) use ($controllerName, $actionName) {
return $paths->getTemplateSource($controllerName, $actionName);
},
at TYPO3Fluid\Fluid\View\AbstractTemplateView->getCurrentParsedTemplate()
in /var/www/html/vendor/typo3fluid/fluid/src/View/AbstractTemplateView.php line 139
if ($actionName) {
$templateRenderingContext->setControllerAction($actionName);
}
try {
$parsedTemplate = $this->getCurrentParsedTemplate();
} catch (PassthroughSourceException $error) {
return $error->getSource();
}
at TYPO3Fluid\Fluid\View\AbstractTemplateView->render()
in /var/www/html/typo3/sysext/fluid/Classes/View/FluidViewAdapter.php line 51
}
public function render(string $templateFileName = ''): string
{
$renderedView = $this->view->render($templateFileName);
if ($renderedView !== null && !is_scalar($renderedView) && !$renderedView instanceof \Stringable) {
throw new \RuntimeException('The rendered Fluid view can not be turned into string', 1731959329);
}
return (string)$renderedView;
at TYPO3\CMS\Fluid\View\FluidViewAdapter->render()
in /var/www/html/typo3/sysext/frontend/Classes/ContentObject/FluidTemplateContentObject.php line 139
$variables = $this->contentDataProcessor->process($this->cObj, $conf, $variables);
$view->assignMultiple($variables);
// Rendering the view internally set's the template (paths). This is required for following asset rendering
$content = $view->render($templateFilename);
$this->renderFluidTemplateAssetsIntoPageRenderer($view, $variables);
if (isset($conf['stdWrap.'])) {
at TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject->render()