Skip to content
Snippets Groups Projects
Commit e592e1b8 authored by Stefan Galinski's avatar Stefan Galinski :video_game:
Browse files

[BUGFIX] Fix redirect if something breaks in the apply action

parent 2db10058
No related branches found
No related tags found
No related merge requests found
...@@ -231,6 +231,7 @@ class JoblistController extends ActionController { ...@@ -231,6 +231,7 @@ class JoblistController extends ActionController {
* @param JobApplication $applyData * @param JobApplication $applyData
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException * @throws \TYPO3\CMS\Extbase\Mvc\Exception\StopActionException
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* @throws \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException
*/ */
public function applyAction(JobApplication $applyData) { public function applyAction(JobApplication $applyData) {
try { try {
...@@ -307,7 +308,13 @@ class JoblistController extends ActionController { ...@@ -307,7 +308,13 @@ class JoblistController extends ActionController {
$this->redirect('applyForm'); $this->redirect('applyForm');
} catch (\Exception $exception) { } catch (\Exception $exception) {
$this->forward('applyForm', NULL, NULL, ['applyData' => $applyData, 'error' => $exception->getMessage()]); $job = $applyData->getJob();
$jobId = $job !== NULL ? $job->getUid() : NULL;
$this->request->setArgument('folderName', $folderName);
$this->forward(
'applyForm', NULL, NULL,
['applyData' => $applyData, 'error' => $exception->getMessage(), 'uid' => $jobId]
);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment