Actions
Bug #91156
openDouble Action execution if redirect at its end
Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-04-21
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint
Description
Fresh installation Typo3 9.5.
After initial configuration, I created a very simple extenstion named 'test', with one controller named 'Test', and two actions 'test' and 'test2', and one frontend plugin named 'test'. I installed this extension and put a plugin onto my homepage.
Action 'test' is writing current date and time to a file, using file_put_contents with FILE_APPEND flag. At the end of 'test' a redirect to 'test2' is executed.
When action is served after a browser request, and after a redirect is complete, I can find 2 new lines in a file mentioned before.
I also prepared fresh Typo3 10.4 and the same problem occured.
<?php
namespace Test\Test\Controller;
class TestController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController
{
public function testAction()
{
file_put_contents('abc.xyz', date('YmdHis') . "\n", FILE_APPEND);
$this->redirect('test2');
}
public function test2Action()
{
echo 'test';
exit;
}
}
?>
Actions