[BUGFIX] Fix exceptions from BE Routing change 86/54886/2
authorSusanne Moog <susanne.moog@typo3.com>
Thu, 30 Nov 2017 12:47:58 +0000 (13:47 +0100)
committerBenni Mack <benni@typo3.org>
Thu, 30 Nov 2017 13:02:20 +0000 (14:02 +0100)
Change-Id: I3f74892da6c82a7213b7f77d5027160ee118eabb
Resolves: #83174
Releases: master
Reviewed-on: https://review.typo3.org/54886
Reviewed-by: Sebastian Hofer <sebastian.hofer@marit.ag>
Tested-by: Sebastian Hofer <sebastian.hofer@marit.ag>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php

index c19f493..27f7100 100644 (file)
@@ -1290,7 +1290,7 @@ class EditDocumentController
                         ) {
                             // TODO: Use the page's pid instead of 0, this requires a clean API to manipulate the page
                             // tree from the outside to be able to mark the pid as active
-                            $returnUrl = (string)$uriBuilder->buildUriFromRoute($queryParams['route'], ['id' => 0]);
+                            $returnUrl = (string)$uriBuilder->buildUriFromRoutePath($queryParams['route'], ['id' => 0]);
                         }
                     }
                     $deleteButton = $buttonBar->makeLinkButton()
index 95f0461..0afe4c4 100644 (file)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Backend\Controller;
 
 use Psr\Http\Message\ResponseInterface;
 use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Backend\Routing\UriBuilder;
 use TYPO3\CMS\Backend\Template\Components\ButtonBar;
 use TYPO3\CMS\Backend\Template\ModuleTemplate;
 use TYPO3\CMS\Backend\Tree\View\NewRecordPageTreeView;
@@ -690,6 +691,7 @@ class NewRecordController
         } elseif ($table === 'pages') {
             $urlParameters['overrideVals']['pages']['doktype'] = (int)$this->pageinfo['doktype'];
         }
+        $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
         $url = (string)$uriBuilder->buildUriFromRoute('record_edit', $urlParameters);
         return '<a href="' . htmlspecialchars($url) . '">' . $linkText . '</a>';
     }