[BUGFIX] IdentityProperties were not set 01/21101/3
authorStefan Froemken <froemken@gmail.com>
Mon, 11 Mar 2013 17:36:49 +0000 (18:36 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Tue, 4 Mar 2014 08:50:37 +0000 (09:50 +0100)
After submitting an invalid form twice, extbase tries to
create the related submodel instead of edit.
This is because of the missing __identity part
for the related submodel

Resolves: #46185
Releases: 6.0, 6.1, 6.2
Change-Id: If3ec15b9eff0fc8d9a7dc682518cbfd72bb4665b
Reviewed-on: https://review.typo3.org/21101
Reviewed-by: Stefan Neufeind
Reviewed-by: Stefan Froemken
Tested-by: Stefan Froemken
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php

index 83937d9..1c5e7a5 100644 (file)
@@ -104,6 +104,7 @@ abstract class AbstractFormFieldViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\
                if ($this->hasArgument('value')) {
                        $value = $this->arguments['value'];
                } elseif ($this->configurationManager->isFeatureEnabled('rewrittenPropertyMapper') && $this->hasMappingErrorOccurred()) {
+                       $this->addAdditionalIdentityPropertiesIfNeeded();
                        $value = $this->getLastSubmittedFormData();
                } elseif ($this->isObjectAccessorMode() && $this->viewHelperVariableContainer->exists('TYPO3\\CMS\\Fluid\\ViewHelpers\\FormViewHelper', 'formObject')) {
                        $this->addAdditionalIdentityPropertiesIfNeeded();