Fluid icon indicating copy to clipboard operation
Fluid copied to clipboard

[BUG] Multiple level references not resolved

Open derhansen opened this issue 7 years ago • 2 comments

Multiple same level references are not resolved.

Example:

  <f:variable name="array" value="{0: {0: 'foo-0.0', 1: 'foo-0.1'}, 1: {0: 'bar-0.1', 1: 'bar-0.1'}}" />
  <f:variable name="index1" value="0" />
  <f:variable name="index2" value="1" />

  Example 1 - Does not work: {array.{index1}.{index2}}

  <f:variable name="subitems" value="{array.{index1}}"/>

  Example 2 - Works: {subitems.{index2}}

Example 1 should also return the given index of the multidimensional array.

derhansen avatar Dec 05 '17 13:12 derhansen

My use case for this looks like:

<f:variable name="array1">section</f:variable>
<f:variable name="string1">value</f:variable>
<f:variable name="sectionValue">{settings.settingsGroup.{array1}.{string1}}</f:variable>

Result : sectionValue is NULL instead of the value of {settings.settingsGroup.section.value}

I can work around it by assigning an intermediate variable for {settings.settingsGroup.{array1}} but that becomes unwieldy with more name parts. I'm using Fluid in TYPO3 9.5.5.

(From: https://twitter.com/NamelessCoder/status/937995733873184768)

phvt avatar Mar 23 '19 23:03 phvt

I can confirm this issue.

{navigation.{parentwhere}.subentry.{where}.title} is NULL

But: <f:alias map="{subs: '{navigation.{parentwhere}.subentry}'}"> {subs.{where}.title} </f:alias> works.

Would be great, if this is fixed soon. Thanx.

EnzephaloN avatar Oct 02 '19 11:10 EnzephaloN

We have https://github.com/TYPO3/Fluid/pull/663 and https://github.com/smoebody/Fluid/commit/51b0a926a7991c0353f3fc80df054bde10881c44 which both try to fix this.

lolli42 avatar May 04 '23 14:05 lolli42