---
title: "Breaking: #108148 - Disallow Fluid variable names with underscore prefix"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:breaking-108148-1763288414"
source: "Changelog/14.0/Breaking-108148-FluidUnderscoreVariablePrefix.rst"
typo3-version: "14.0"
typo3-major: 14
type: "breaking"
issue: 108148
forge: "https://forge.typo3.org/issues/108148"
tags: ["Fluid", "NotScanned", "ext:fluid"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Breaking: #108148 - Disallow Fluid variable names with underscore prefix {#breaking-108148-1763288414}

See [forge#108148](https://forge.typo3.org/issues/108148)

## Description {#description}

With Fluid 5, it is no longer possible to define custom template variables
that start with an underscore (`_`). These variable names are reserved for
future internal use by Fluid itself, similarly to the already existing
`{_all}`.

## Impact {#impact}

This change affects ViewHelpers that define new variables, such as:

-   [\<f:variable>](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/Variable.html#typo3fluid-fluid-variable)
-   [\<f:for>](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/For.html#typo3fluid-fluid-for)
-   [\<f:render>](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/Render.html#typo3-fluid-render)

It also affects Fluid's PHP APIs, namely `$view->assign()` and
`$view->assignMultiple()`.

## Affected installations {#affected-installations}

Installations with Fluid templates that use custom variable names starting
with an underscore (`_`) will encounter exceptions when such a template is
rendered. A deprecation has been written to the deprecation log since
TYPO3 13.4.21 if this is encountered in a Fluid template during rendering.

For template files already using the new `*.fluid.*` file extension, the built-in
template analyse command will discover affected template files:

```sh
vendor/bin/typo3 fluid:analyse
```

For each affected template, the command will output an error like this:

```
[ERROR] packages/myext/Resources/Private/Templates/Test.fluid.html: Variable identifiers cannot start with a "_": _myvariable
```

## Migration {#migration}

The following examples no longer work with Fluid 5:

```html
<f:variable name="_temp" value="a temporary value" />
{_temp}
```

```html
<f:for each="{myArray}" as="_item">
    {_item}
</f:for>
```

```html
<f:render partial="Footer" arguments="{_data: myData}" />
```

```php
$view->assign('_data', $myData);
$view->assignMultiple([
    '_data' => $myData,
]);
```

All examples lead to the following exception:

```
#1756622558 TYPO3Fluid\Fluid\Core\Variables\InvalidVariableIdentifierException
Variable identifiers cannot start with a "_": _myVariable
```

In all cases, the variable name must be changed to no longer start with an
underscore (`_`).

Note that this only affects variable names, not property names in objects or
array keys that are accessed within a Fluid template. The following examples
are **not** affected by this change:

```html
{myArray._myKey}
{myObject._myProperty}
```

Also note that the existing `{_all}` (and any further internal variables added
by Fluid) are **not affected**. This code will continue to work:

```html
<f:render partial="Footer" arguments="{_all}"/>
```
