Project

General

Profile

Actions

Bug #77097

closed

[__referrer][@request] is set only for the first form, when forms are generated in a f:for loop

Added by Viktor Livakivskyi over 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Start date:
2016-07-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
On Location Sprint

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #78551: Second form in template doesn't render hidden field for checkboxClosedNicole Cordes2016-11-03

Actions
Actions #1

Updated by Nicole Cordes over 8 years ago

  • Assignee set to Nicole Cordes
Actions #2

Updated by Nicole Cordes over 8 years ago

  • Sprint Focus set to On Location Sprint
Actions #3

Updated by Oliver Hader over 8 years ago

I did not test this issue, but if it's reproducible it would be a regression

Actions #4

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>
Actions #5

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
Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

Updated by Daniel Goerz about 8 years ago

  • Target version set to Candidate for patchlevel
Actions #13

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

Actions #14

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

Actions #15

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

Actions #16

Updated by Anonymous almost 8 years ago

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

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

Actions #18

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

Actions #19

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

Actions #20

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

Actions #21

Updated by Anja Leichsenring almost 8 years ago

  • Status changed from Under Review to Resolved
Actions #22

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF