[BUGFIX] Avoid redirecting to a deleted page 08/44708/2
authorMorton Jonuschat <m.jonuschat@mojocode.de>
Fri, 13 Nov 2015 15:49:15 +0000 (16:49 +0100)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 13 Nov 2015 18:49:10 +0000 (19:49 +0100)
When deleting a page via the EditDocumentController avoid redirecting
the user to the just deleted page and send him to the parent page
instead. This avoids an exception due to missing access rights on a
deleted page.

Resolves: #71425
Releases: master
Change-Id: I8775c3765afe9870131b80de6be655239777c07f
Reviewed-on: https://review.typo3.org/44708
Tested-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Bjoern Jacob <bjoern.jacob@tritum.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index 1400fe7..1228166 100644 (file)
@@ -1340,7 +1340,7 @@ class EditDocumentController extends AbstractModule
                             Icon::SIZE_SMALL
                         ))
                         ->setDataAttributes([
-                            'return-url' => $this->retUrl,
+                            'return-url' => BackendUtility::getModuleUrl('web_layout', array('id' => $this->pageinfo['pid'])),
                             'uid' => $this->firstEl['uid'],
                             'table' => $this->firstEl['table']
                         ]);