Bug #27415
closed
ViewHelper Forms with method get and action parameter do not address to right action
Added by René Wagner over 13 years ago.
Updated about 8 years ago.
Description
A form like the following is rendered invalid:
<f:form action="list" method="get" id="searchForm" name="searchForm">...</f:form>
The reason is, it is addressing the action as a query string in the form action attribute. This query string gets completely substituted by the form fields inside the form.
Resolution: On get formulars, render the query string as hidden form fields.
Manual workaround:
<f:form action="list" method="get" id="searchForm" name="searchForm">
<f:form.hidden name="action" value="list" />
...
</f:form>
- Status changed from New to Accepted
At least it would be up to the browser to merge the two (get-arguments from action-URL and from the form). I agree this doesn't seem right. And checking with at least Firefox 4 those arguments are lost as you describe.
Same holds true for fluid in FLOW3.
The way we should probably implement this, would be to create the action URI as before, parse it with parse_url() and retrieve the query parameters with parse_str() And then we could create the hidden fields from them. This should happen for GET only and it should be possible to deactivate it IMO.
- Project changed from 534 to 2559
- Category changed from 963 to Fluid: ViewHelpers
TYPO3 Fluid has an implementation for this AFAICS
Seems to be fixed in Flow3 in issue #11636
Any hope to have backport for 6.2 ?
With this bug, I can't expect to have in working state in the same time :
- a table with results
- a filter form for table
- a paginate widget
Pass hidden value didn't work with 6.1.5.
Set the form method to post imply to persist form values which is an alternative solution but imply also many new checks to handle.
- Target version set to Fluid 6.2
We could not backport this 1:1 because we have to have realurl in mind.
- Project changed from 2559 to TYPO3 Core
- Category changed from Fluid: ViewHelpers to Fluid
- Target version changed from Fluid 6.2 to 7.0
- TYPO3 Version set to 6.2
- Is Regression set to No
- Target version changed from 7.0 to 7.1 (Cleanup)
- Target version changed from 7.1 (Cleanup) to 7.4 (Backend)
- Target version changed from 7.4 (Backend) to 7.5
- Target version deleted (
7.5)
I suggest closing this one. It is known that creating colliding field names causes the last used field name to override others. That's very much by design, would also happen in a regular form where you set "action" with arguments you also set in form - and all the suggested acrobatics about parsing the current request seems to be much overkill. It's not really a "bug", it's more of a feature - that you're actually able to for example set a dynamic controller name, template format etc. by creating input fields named for these reserved API-level URL parameters.
- Status changed from Accepted to Closed
Closing, partly due to lack of interest (no activity in three years) and partly due to this being by design. If you disagree with the decision feel free to request reopening or open a new issue referring to this one.
Also available in: Atom
PDF