Project

General

Profile

Actions

Bug #66926

closed

Request-Arguments are lost when validation fails

Added by Thomas Blaß over 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-05-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

In an extbase controller with a new and create action, the request arguments are lost, if the validation on the create-action reports errors and redirects to the new action. If the validation is successfull the Arguments are not lost.
This behavior has changed from former Typo3 Versions (6.0) where the arguments existed after redirect/validation.

I tried to figure out where this happens, but could not resolve the problem due to lack of knowledge on the extbase core. I got down to it, that in the first loop of the dispatcher->process the request is correct and contains the arguments, in the second loop the arguments are empty.

The original request ( $this->request->getOriginalRequest() ) contains the arguments but I think the arguments should not get lost during validation/redirection.

Actions #1

Updated by Christian Kuhn over 9 years ago

  • Status changed from New to Closed

This is by intention and was changed in extbase/fluid/flow a while ago:
The former solution had the issue that not validated models are given around, which is not cool from an integrity point of view. The logic was changed that the "broken" objects are discarded and no longer given to the referrer action. The arguments are given to fluid directly, so it can display them again as new default values. If the controller needs to do stuff with the arguments, they can be found in $this->request->getOriginalRequest() or similar.

Actions #2

Updated by Moritz Ahl about 9 years ago

This should be reflected in the documentation. The documentation implies that the object is being passed back to the originating action which makes it nescessary to add the "ignorevalidation" annotation. That leads to unnescessary confusion:
https://docs.typo3.org/typo3cms/ExtbaseFluidBook/3-BlogExample/11-Alternative-route-creating-a-new-posting.html

Actions #3

Updated by Stephan Großberndt about 9 years ago

Please propose an according update to the documentation using the "Edit me on github" link in the document.

Actions #4

Updated by Thomas Prangenberg over 7 years ago

The documentation still describes the wrong behaviour in multiple passages, e.g. https://docs.typo3.org/typo3cms/ExtbaseFluidBook/7-Controllers/1-Creating-Controllers-and-Actions.html#flow-pattern-creating-a-new-domain-object

This should really get either updated or removed since the documentaion causes a lot of confusion, ending up with developers getting stuck.

Actions

Also available in: Atom PDF