[BUGFIX] IdentityProperties were not set 51/28051/3
authorStefan Froemken <froemken@gmail.com>
Mon, 11 Mar 2013 17:36:49 +0000 (18:36 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Wed, 5 Mar 2014 21:57:21 +0000 (22:57 +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/28051
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/fluid/Classes/ViewHelpers/Form/AbstractFormFieldViewHelper.php

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