diff -u b/core/lib/Drupal/Core/Path/PathMatcher.php b/core/lib/Drupal/Core/Path/PathMatcher.php --- b/core/lib/Drupal/Core/Path/PathMatcher.php +++ b/core/lib/Drupal/Core/Path/PathMatcher.php @@ -101,7 +101,7 @@ // route match, like on exception responses. if ($this->routeMatch->getRouteName()) { $url = Url::fromRouteMatch($this->routeMatch); - $this->isCurrentFrontPage = ($url->getRouteName() && $url->toString() === $this->getFrontPagePath()); + $this->isCurrentFrontPage = ($url->getRouteName() && ltrim($url->toString()) === $this->getFrontPagePath()); } } return $this->isCurrentFrontPage; diff -u b/core/modules/config_translation/src/ConfigNamesMapper.php b/core/modules/config_translation/src/ConfigNamesMapper.php --- b/core/modules/config_translation/src/ConfigNamesMapper.php +++ b/core/modules/config_translation/src/ConfigNamesMapper.php @@ -212,7 +212,7 @@ * {@inheritdoc} */ public function getBasePath() { - return Url::fromRoute($this->getBaseRouteName(), $this->getBaseRouteParameters())->toString(); + return Url::fromRoute($this->getBaseRouteName(), ltrim($this->getBaseRouteParameters())->toString()); } /** @@ -249,7 +249,7 @@ * {@inheritdoc} */ public function getOverviewPath() { - return Url::fromRoute($this->getOverviewRouteName(), $this->getOverviewRouteParameters())->toString(); + return Url::fromRoute($this->getOverviewRouteName(), ltrim($this->getOverviewRouteParameters())->toString()); } /**