[BUGFIX] Fluid form fields only convert identifier objects to identifier 35/43735/9
authorAndreas Allacher <andreas.allacher@gmx.at>
Fri, 2 Oct 2015 10:03:11 +0000 (12:03 +0200)
committerMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 16 Oct 2015 09:39:00 +0000 (11:39 +0200)
With the change from getValue to getValueAttribute Fluid now converts
all objects to identifier objects which is wrong because there are many
objects that are valid without identifiers.
For instance, ObjectStorage in multiple select field.
Or a object that implements __toString in TextfieldViewHelper.

The change was introduced with commit https://review.typo3.org/42298/

Change-Id: I666112feeb05381553e8a22881773689f84491b7
Resolves: #70302
Releases: master
Reviewed-on: http://review.typo3.org/43735
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php

index c410c94..d1862eb 100644 (file)
@@ -192,9 +192,7 @@ abstract class AbstractFormFieldViewHelper extends AbstractFormViewHelper
             $value = $this->arguments['value'];
         }
 
-        if (is_object($value)) {
-            $value = $this->persistenceManager->getIdentifierByObject($value);
-        }
+        $value = $this->convertToPlainValue($value);
         return $value;
     }