Commit 2b5ac2f2 authored by Kevin Ditscheid's avatar Kevin Ditscheid

Merge branch 'master' of gitlab.sgalinski.de:typo3/sg_routes

parents 9f1f0c22 07fcf37f
......@@ -90,7 +90,7 @@ class RoutingService {
// This can only be changed to a Response based approach, if TYPO3 lets us somehow return a
// RedirectResponse object
@\ob_end_clean();
\header('HTTP/1.1 302 PagenotfoundHandler Redirect');
\header('HTTP/1.1 302 EXT:sg_routes Redirect To Login');
\header('Location: ' . GeneralUtility::locationHeaderUrl($loginUrl));
exit;
}
......@@ -117,7 +117,13 @@ class RoutingService {
);
if ($function === '') {
// empty function means redirect to parent page
$pageId = $request->getAttribute('routing')->getPageId();
$routing = $request->getAttribute('routing');
if (method_exists($routing, 'getPageId')) {
$pageId = $request->getAttribute('routing')->getPageId();
} else {
$pageId = $rootUid;
}
$pageQueryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(
'pages'
);
......
......@@ -6,7 +6,7 @@
"license": [
"GPL-2.0-or-later"
],
"version": "3.1.3",
"version": "3.1.5",
"support": {
"issues": "https://gitlab.sgalinski.de/typo3/sg_routes"
},
......
......@@ -4,7 +4,7 @@ $EM_CONF[$_EXTKEY] = [
'title' => 'URL Redirects and Page Not Found Handling',
'description' => 'URL Redirects and Page Not Found Handling',
'category' => 'module',
'version' => '3.1.3',
'version' => '3.1.5',
'state' => 'stable',
'uploadfolder' => FALSE,
'createDirs' => '',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment