Bug #66533
closedPaths not possible if array used as form object
100%
Description
AbsractFormFieldViewHelper: line 191 (TYPO3 7.1)
protected function getPropertyValue() {
if (!$this->viewHelperVariableContainer->exists(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject')) {
return NULL;
}
$formObject = $this->viewHelperVariableContainer->get(\TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper::class, 'formObject');
$propertyName = $this->arguments['property'];
if (is_array($formObject)) {
return isset($formObject[$propertyName]) ? $formObject[$propertyName] : NULL;
}
return ObjectAccess::getPropertyPath($formObject, $propertyName);
}
It is not possible to use an array as filter-object in an f:form context with a little bit more complex structures.
I have a 2-dimensional multiple select and want to use an array as filter object but fluid cant determine the value because only one level is checked to retreive the selected value (see above)
If you simple delete the if condition it works, the ObjectAccess::getPropertyPath Utilityfunction is able to work with multi-dimensional arrays, so for what doing this check? It only limits the possibilities.
I think i reported the same isse some time past, so maybe this exists in the fluid package itself and got backported again? But i dont know for sure...