[Neos] Neos TYPO3.Form Redirect Finisher Issues

nikos nick at jamalade.com
Mon Jul 28 18:01:41 CEST 2014


I Just wanted to check whether there is an 'issue' with the RedirectFinisher in the Form package, which I gave up trying to use because I couldn't get 
it workin, but now have had a bit of tine to investigate.

It seems in the the redirect Finisher the 'output' is rendered in the (topmost) parent of the FormRuntime response ie.

      $response = $formRuntime->getResponse();
      $mainResponse = $response;
      while ($response = $response->getParentResponse()) {
         $mainResponse = $response;
      $mainResponse->setContent('<html><head><meta http-equiv="refresh" content="' . $delay . ';url=' . $escapedUri . '"/></head></html>');

In the actual FormRuntime class the content is obtained from the response content in the render method ie.

     $theContent = $this->response->getContent();

So the redirect output from RedirectFinisher is ignored, at least it is in my setup.

So I assume it is best to just use formRuntime->getResponse() and set the content without looping through to find the parent response, this seems to 
give the right redirect response.

Also as an aside only the output (to the response) from the last Finisher (to output) will be rendered.

Does this fit with others experience?

Warm wishes


More information about the Neos mailing list