diff --git a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php index b0ade4bd6e9..413d2dac480 100644 --- a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php +++ b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathFinder.php @@ -242,7 +242,7 @@ private function fetchSingle(string $where, array $parameters): DocumentNodeInfo ); } catch (DBALException $e) { throw new \RuntimeException(sprintf( - 'Failed to load node for query "%s": %s', + 'Failed to fetch a node, please ensure the projection is setup. Query "%s". %s', $where, $e->getMessage() ), 1599664746, $e); @@ -273,7 +273,7 @@ private function fetchMultiple(string $where, array $parameters): DocumentNodeIn ); } catch (DBALException $e) { throw new \RuntimeException(sprintf( - 'Failed to load node for query "%s": %s', + 'Failed to fetch multiple nodes, please ensure the projection is setup. Query "%s". %s', $where, $e->getMessage() ), 1683808640, $e); @@ -314,7 +314,7 @@ public function disableCache(): void public function getDescendantsOfNode(DocumentNodeInfo $node): DocumentNodeInfos { return $this->fetchMultiple( - 'dimensionSpacePointHash = :dimensionSpacePointHash + 'dimensionSpacePointHash = :dimensionSpacePointHash AND nodeAggregateIdPath LIKE :childNodeAggregateIdPathPrefix', [ 'dimensionSpacePointHash' => $node->getDimensionSpacePointHash(), diff --git a/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php b/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php index 9f1003588d6..7728c3b5361 100644 --- a/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php +++ b/Neos.Neos/Classes/FrontendRouting/SiteDetection/SiteDetectionMiddleware.php @@ -65,6 +65,7 @@ public function process(ServerRequestInterface $request, RequestHandlerInterface return $handler->handle($request); } + // doctrine is running and we could fetch a site. This makes no promise if the content repository is set up. $siteDetectionResult = SiteDetectionResult::create($site->getNodeName(), $site->getConfiguration()->contentRepositoryId); return $handler->handle($siteDetectionResult->storeInRequest($request)); }