Fluid icon indicating copy to clipboard operation
Fluid copied to clipboard

Variable assignment with f:variable in compiled templates may fail

Open NamelessCoder opened this issue 8 years ago • 2 comments

Presented use case:

<f:variable name="zero1" value="0" />
{f:variable(name: 'zero2', value: 0)}
<f:debug>{zero1}</f:debug>
<f:debug>{zero2}</f:debug>

When I first call this, the output is:

0 (integer) 0 (double)

After simply reloading the browser, the output becomes:

NULL NULL


Assuming the above is true, f:variable may have a problem assigning the variable once the template is compiled; or the variable provider somehow does not return the right variable.

NamelessCoder avatar Aug 01 '17 10:08 NamelessCoder

I've stumbled over this issue too. is there a bugfix around or a patch?

X-Tender avatar Sep 07 '17 10:09 X-Tender

Not sure if this is the fix: https://github.com/TYPO3/Fluid/pull/333 The problem is still present in current TYPO3 v8.7.8.

maikschneider avatar Oct 24 '17 12:10 maikschneider

this was fixed meanwhile, we're adding a test case to show this.

lolli42 avatar Nov 24 '23 16:11 lolli42