Bug #59253

Additional Identity Properties not set on mapping error

Added by Anja Leichsenring about 1 year ago. Updated 9 months ago.

Status:Resolved Start date:2014-06-01
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:Fluid Spent time: -
Target version:-
TYPO3 Version:7 Is Regression:No
PHP Version: Sprint Focus:
Complexity:

Description

Backport from #29290, see this issue for detailed problem description

When binding Fluid forms to nested objects, Fluid automatically adds
hidden fields with the identifiers of all affected objects so that
the persistence layer can update all objects correctly.

When a form was redisplayed due to property mapping errors, the
identity fields for the nested sub objects were no longer created.

This change fixes this by making sure all identity fields are rendered
recursively also after property mapping errors.

Example code to verify this::
<f:form action="update" object="{user}" objectName="user">
<f:form.textfield property="firstName" />
<f:for each="{user.invoices}" as="invoice" iteration="iteration"> {iteration.cycle}:
<f:form.textfield property="invoices.{iteration.index}.subject" />
</f:for>
<f:form.submit value="update" />
</f:form>

When submitting the form with validation errors, the redisplayed form
should contain a div with a hidden field named
"user[__identity]" for the user and one for each invoice.


Related issues

related to TYPO3.Fluid - Bug #29290: Additional Identity Properties not set on mapping error Resolved 2011-08-26

Associated revisions

Revision 622926a2
Added by Anja Leichsenring 9 months ago

[BUGFIX] Additional Identity Properties not set on mapping error

When binding Fluid forms to nested objects, Fluid automatically adds
hidden fields with the identifiers of all affected objects so that
the persistence layer can update all objects correctly.

When a form was redisplayed due to property mapping errors, the
identity fields for the nested sub objects were no longer created.

This change fixes this by making sure all identity fields are rendered
recursively also after property mapping errors.

Backport from #29290
Resolves: #59253
Releases: master
Change-Id: Ib4b2a065d967e87aa42bdc889fef3f0b727b748b
Reviewed-on: http://review.typo3.org/30502
Reviewed-by: Stefan Froemken <>
Tested-by: Stefan Froemken <>
Reviewed-by: Markus Klein <>
Tested-by: Markus Klein <>

History

#1 Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/30502

#2 Updated by Gerrit Code Review 9 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30502

#3 Updated by Gerrit Code Review 9 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30502

#4 Updated by Anja Leichsenring 9 months ago

  • Description updated (diff)

#5 Updated by Anja Leichsenring 9 months ago

  • TYPO3 Version changed from 6.2 to 7

#6 Updated by Gerrit Code Review 9 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30502

#7 Updated by Gerrit Code Review 9 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/30502

#8 Updated by Anja Leichsenring 9 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF