Bug #29290
Additional Identity Properties not set on mapping error
100%
Description
After a mapping error occurred, no additional identity properties are set and FLOW3 tries to create a new object.
Could be easily fixed in TYPO3\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper
currently:
protected function getValue() { $value = NULL; if ($this->arguments->hasArgument('value')) { $value = $this->arguments['value']; } elseif ($this->hasMappingErrorOccured()) { $value = $this->getLastSubmittedFormData(); } elseif ($this->isObjectAccessorMode() && $this->viewHelperVariableContainer->exists('TYPO3\Fluid\ViewHelpers\FormViewHelper', 'formObject')) { $this->addAdditionalIdentityPropertiesIfNeeded(); $value = $this->getPropertyValue(); } if (is_object($value)) { $identifier = $this->persistenceManager->getIdentifierByObject($value); if ($identifier !== NULL) { $value = $identifier; } } return $value; }
Better:
protected function getValue() { $value = NULL; if ($this->arguments->hasArgument('value')) { $value = $this->arguments['value']; } elseif ($this->hasMappingErrorOccured()) { $this->addAdditionalIdentityPropertiesIfNeeded(); $value = $this->getLastSubmittedFormData(); } elseif ($this->isObjectAccessorMode() && $this->viewHelperVariableContainer->exists('TYPO3\Fluid\ViewHelpers\FormViewHelper', 'formObject')) { $this->addAdditionalIdentityPropertiesIfNeeded(); $value = $this->getPropertyValue(); } if (is_object($value)) { $identifier = $this->persistenceManager->getIdentifierByObject($value); if ($identifier !== NULL) { $value = $identifier; } } return $value; }
Related issues
Updated by Bastian Waidelich about 9 years ago
- Status changed from New to Accepted
- Assignee set to Bastian Waidelich
Updated by Gerrit Code Review over 8 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13600
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13600
Updated by Gerrit Code Review over 8 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13600
Updated by Gerrit Code Review over 8 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13600
Updated by Gerrit Code Review over 8 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/13600
Updated by Gerrit Code Review almost 8 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13600
Updated by Gerrit Code Review almost 8 years ago
Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13600
Updated by Gerrit Code Review over 7 years ago
Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13600
Updated by Gerrit Code Review over 7 years ago
Patch set 9 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13600
Updated by Gerrit Code Review over 7 years ago
Patch set 10 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/13600
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/24068
Updated by Gerrit Code Review over 7 years ago
Patch set 2 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/24068
Updated by Alexander Berl over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3a56759eb8548783d540dd757b24cfa6c244c46b.
Updated by Stefan Froemken about 1 year ago
- Related to Bug #90331: f:hidden does not add identity fields added