[TYPO3-mvc] A lot of failing unit tests for Extbase and Fluid
Tobias Liebig
tobias.liebig at typo3.org
Wed Jun 27 15:18:23 CEST 2012
Am 27.06.2012 um 11:28 schrieb Bastian Waidelich:
> The reason for the fatal error is a change to the extbase ActionController introduced with https://review.typo3.org/#/c/4415/ (this change was needed apparently, cause TYPO3s pagerenderer does not support USER_INT content objects).
>
> I could fix the test by replacing
>
> $response->setRequest($request);
>
> with
>
> if ($response instanceof Tx_Extbase_MVC_Web_Response) {
> $response->setRequest($request);
> }
>
> in Tx_Extbase_MVC_Controller_ActionController::processRequest()
> Can someone of you confirm and create a patch if it makes sense to you?
>
> In the long run we should fix the PageRenderer though and revert the Request. Maybe someone could add a TODO comment to the respective if statement in Tx_Extbase_MVC_Web_Response::addAdditionalHeaderData()?
You're right. This actually works around the problem but does not fix the issue.
The request is needed in Tx_Extbase_MVC_Web_Response to distinguish between a cached or a non-cached request in addAdditionalHeaderData().
For me addAdditionalHeaderData seems to be to wrong place to decide where these headerData should go to.
I like to suggest to move the request member with its setter/getter into the super class from Tx_Extbase_MVC_Web_Response to Tx_Extbase_MVC_Response to have the same API for all Response implementations instead of checking for a certain Class in the action controller.
http://review.typo3.org/12397
regards
tobias
--
Tobias Liebig
TYPO3 Core Team member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
http://bit.ly/supportTYPO3
More information about the TYPO3-project-typo3v4mvc
mailing list