Bug #77097
closed[__referrer][@request] is set only for the first form, when forms are generated in a f:for loop
100%
Description
Hi,
There is an issue with setting hidden referrer request field. When a form is placed standalone in a template, it contains a [__referrer][@request] in it. However, when a form is placed in a loop, only the first form contains referring request field.
Consider a following example:
<f:form action="anything" name="license" enctype="multipart/form-data"> <f:form.textarea /> <f:form.submit value="{f:translate(key: 'submit')}" /> </f:form> <f:form action="anything" name="license" enctype="multipart/form-data"> <f:form.textarea /> <f:form.submit value="{f:translate(key: 'submit')}" /> </f:form> <f:for each="{0: 'zero', 1: 'one'}" as="something"> <f:form action="anything" name="license" enctype="multipart/form-data"> <f:form.textarea /> <f:form.submit value="{f:translate(key: 'submit')}" /> </f:form> </f:for>
Resulting output:
Form 1: contains [__referrer][@request], because is placed standalone.
Form 2: contains [__referrer][@request], because is placed standalone.
Form 3: contains [__referrer][@request], because is first in a loop.
Form 4: doesn't contain [__referrer][@request], because is second in a loop.
This results in different behavior in case of validation errors. First form from a loop will show validation errors at current page, while all the next forms will open resulting page and show a generic error message, like Validation failed while trying to call Vendor\Extensions\Controller\MyController->anythingAction().
TYPO3 7.6.9
Plugin's actions (both: the one that shows a forms, and the one that is used as form's target) are non-cacheable.
Updated by Nicole Cordes over 8 years ago
- Sprint Focus set to On Location Sprint
Updated by Oliver Hader over 8 years ago
I did not test this issue, but if it's reproducible it would be a regression
Updated by Markus Friedrich over 8 years ago
If you disable caching, this error doesn't occur, but you can simply reproduce it with activated caching, the following TypoScript and by using the given fluid template:
page = PAGE page.10 = FLUIDTEMPLATE page.10.file = <path_to_file_with_given_fluid_code>
Updated by Nicole Cordes over 8 years ago
- Status changed from New to Accepted
- Assignee deleted (
Nicole Cordes) - Is Regression changed from No to Yes
Updated by Gerrit Code Review over 8 years ago
- Status changed from Accepted 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/49104
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49104
Updated by Gerrit Code Review over 8 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49104
Updated by Gerrit Code Review over 8 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49104
Updated by Gerrit Code Review over 8 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49104
Updated by Gerrit Code Review over 8 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49104
Updated by Daniel Goerz about 8 years ago
- Target version set to Candidate for patchlevel
Updated by Gerrit Code Review about 8 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49104
Updated by Gerrit Code Review about 8 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/49104
Updated by Gerrit Code Review almost 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50847
Updated by Anonymous almost 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1d2ee7abc1d4527a2a6ef845c9e799e18e1bc0f8.
Updated by Gerrit Code Review almost 8 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50848
Updated by Gerrit Code Review almost 8 years ago
Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50849
Updated by Gerrit Code Review almost 8 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50848
Updated by Gerrit Code Review almost 8 years ago
Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/50848
Updated by Anja Leichsenring almost 8 years ago
- Status changed from Under Review to Resolved
Applied in changeset b4aceeaa4657f034be186f70bd71f9717c1f6d68.