From 107b282181f59d4e109cc3d65f37746e9f3b25a3 Mon Sep 17 00:00:00 2001 From: Martin Ficzel Date: Sun, 22 Dec 2024 12:42:06 +0100 Subject: [PATCH] BUGFIX: Use nodeAggregateId as fallback for uriPathSegment instead of "" Since "" is treated as the uriPath for a site node this causes confusion if it is projected for a document in cases where one was created without an uriPathSegment which may happen for tethered nodes. Resolves: #5412 --- .../FrontendRouting/Projection/DocumentUriPathProjection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php index 4adcba2389..36459b4aa3 100644 --- a/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php +++ b/Neos.Neos/Classes/FrontendRouting/Projection/DocumentUriPathProjection.php @@ -209,7 +209,7 @@ private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCre } $propertyValues = $event->initialPropertyValues->getPlainValues(); - $uriPathSegment = $propertyValues['uriPathSegment'] ?? ''; + $uriPathSegment = $propertyValues['uriPathSegment'] ?? $event->nodeAggregateId->value; $shortcutTarget = null; if ($documentTypeClassification === DocumentTypeClassification::CLASSIFICATION_SHORTCUT) {