Skip to content

Commit

Permalink
[BUGFIX] Add RootPage to Slug Candidates
Browse files Browse the repository at this point in the history
The slug candidates resolving now takes "/" into account,
allowing to find the root page as well. This way, the PageRouter
applies Route Enhancers to the root page as well,
so segments like "/my-news-plugin/" also applies to
"/".

Resolves: #86939
Releases: master
Change-Id: I56015e1d5bf4a8e9e12c4ebcef8bdc95e1d5c8e2
Reviewed-on: https://review.typo3.org/58901
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Steffen Dietrich <Teilzeitphilosoph@gmx.de>
Tested-by: Steffen Dietrich <Teilzeitphilosoph@gmx.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
  • Loading branch information
achimfritz authored and bmack committed Nov 16, 2018
1 parent cda6c03 commit 206414c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions typo3/sysext/core/Classes/Routing/PageRouter.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ function (DecoratingEnhancerInterface $decorationEnhancers) {
* /home/about-us
* /home/
* /home
* /
*
* @param string $routePath
* @return array
Expand All @@ -450,6 +451,7 @@ protected function getCandidateSlugsFromRoutePath(string $routePath): array
$candidatePathParts[] = $prefix;
array_pop($pathParts);
}
$candidatePathParts[] = '/';
return $candidatePathParts;
}

Expand Down

0 comments on commit 206414c

Please sign in to comment.