diff --git a/Classes/ViewHelpers/TranslateElementPropertyViewHelper.php b/Classes/ViewHelpers/TranslateElementPropertyViewHelper.php index c311360..960bc13 100644 --- a/Classes/ViewHelpers/TranslateElementPropertyViewHelper.php +++ b/Classes/ViewHelpers/TranslateElementPropertyViewHelper.php @@ -72,14 +72,6 @@ public static function renderStatic(array $arguments, \Closure $renderChildrenCl $property = $arguments['renderingOptionProperty']; } - if (empty($property)) { - $propertyParts = []; - } elseif (\is_array($property)) { - $propertyParts = $property; - } else { - $propertyParts = [$property]; - } - /** @var TYPO3\CMS\Form\FormRuntime $formRuntime */ $formRuntime = $renderingContext ->getViewHelperVariableContainer() @@ -118,6 +110,12 @@ public static function renderStatic(array $arguments, \Closure $renderChildrenCl ); } + /* + * Parent renderStatic will call TranslationService->translateFormElementValue(...). + * It can not handle properties that are multidimensional arrays. + */ + $arguments['property'] = self::getPropertyName($property); + $ret = parent::renderStatic($arguments, $renderChildrenClosure, $renderingContext); if ($property === 'label' || $property === 'elementDescription' || diff --git a/Readme.md b/Readme.md index 6f2e208..cd105e8 100644 --- a/Readme.md +++ b/Readme.md @@ -113,7 +113,8 @@ default language. | 2.1.x | 11.5.x | Compatibility for TYPO3 11.5 | | 2.3.0 | 11.5.x | Compatibility for PHP 8.1 | | 2.3.2 | 11.5.x | Added event dispatcher to show translate labels or not | -| 2.3.5 | 11.5.x | Bugfix: PHP Warning: Array to string conversion | | +| 2.3.5 | 11.5.x | Bugfix: PHP Warning: Array to string conversion | +| 2.3.6 | 11.5.x | Bugfix: PHP Warning: Array to string conversion | ## How to activate for BE users diff --git a/ext_emconf.php b/ext_emconf.php index 87fd955..432ca60 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -7,7 +7,7 @@ 'author' => 'Alexander Bohndorf', 'author_email' => 'bohndorf@sitegeist.de', 'state' => 'beta', - 'version' => '2.3.5', + 'version' => '2.3.6', 'constraints' => [ 'depends' => [ 'typo3' => '10.0.0-11.5.99',