diff --git a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php b/typo3/sysext/core/Classes/DataHandling/SlugHelper.php index 77aee4f2a7f26d87487783ee23885d92641e6126..d6327ebbc7ad290474b5dcaff99438d671fe8c89 100644 --- a/typo3/sysext/core/Classes/DataHandling/SlugHelper.php +++ b/typo3/sysext/core/Classes/DataHandling/SlugHelper.php @@ -303,6 +303,9 @@ class SlugHelper $siteOfCurrentRecord = $siteFinder->getSiteByPageId($pageId); } catch (SiteNotFoundException $e) { // Not within a site, so nothing to do + // TODO: Rather than silently ignoring this misconfiguration, + // a warning should be thrown here, or maybe even let the + // exception bubble up and catch it in places that uses this API return true; } foreach ($records as $record) { diff --git a/typo3/sysext/core/Classes/Routing/Aspect/SiteAccessorTrait.php b/typo3/sysext/core/Classes/Routing/Aspect/SiteAccessorTrait.php index cb444d519fb934d5d322a10d923984c97f07a4bd..1fce0616a8a5597c7e27f254ce60fd25b0a72629 100644 --- a/typo3/sysext/core/Classes/Routing/Aspect/SiteAccessorTrait.php +++ b/typo3/sysext/core/Classes/Routing/Aspect/SiteAccessorTrait.php @@ -95,7 +95,11 @@ trait SiteAccessorTrait $expectedSite = $this->getSiteMatcher()->matchByPageId($pageId); return $expectedSite->getRootPageId() === $this->site->getRootPageId(); } catch (SiteNotFoundException $exception) { - return false; + // Same as in \TYPO3\CMS\Core\DataHandling\SlugHelper::isUniqueInSite + // where it is assumed that a record, that is not in site context, + // but still configured uniqueInSite is unique. We therefore must assume + // the resolved record to be rightfully part of the current site. + return true; } }