Bug #106843
openProblem with FlexFormFieldValues with settings.something fields inside Fluid
0%
Description
Scenario:
A FlexForm field defines two Sheets "A" and "B".
Inside "A" there is a field called "settings.field_alpha"
Inside "B" there is a field called "settings.field_beta"
Now, inside a Fluid template I want to access one of those values:
{flexField.settings.field_alpha}
This triggers the error:
TYPO3\CMS\Core\Domain\Exception\FlexFieldPropertyException
Given id is ambigious since the field exists in multiple sheets and no sheet is defined.
The root problem is, that Fluid wants to first access "settings" (which is ambigious), and only then "field_alpha".
In PHP code this would work without problems:
$flexField->get('settings.field_alpha');
Workaround:
Use Fluid variables to "trick" Fluid and pass the sheet to distinguish the path:
<f:variable name="path" value="A/settings"/> {flexField.{path}.field_alpha}
Solution:
The ideal solution would of course be to "teach" Fluid to access the full path identifier as a whole.
However, a new syntax would be required for that only to fix this one specific use case.
Another idea would be to allow only "settings" to exist in multiple sheets. If there are duplicate identifiers, the last one "wins".
The key "settings" is standing out, as it is used for Extbase Settings and is available as a flat list in ActionController.
Allowing this exception would make it possible to access these values in normal Content Elements / Plugins as well.