Skip to content

Commit

Permalink
Merge pull request #4640 from neos/bugfix/4639-fir-DocumentUriPathPro…
Browse files Browse the repository at this point in the history
…jection-for-new-child-nodes-of-disabled-nodes

BUGFIX: Fix `DocumentUriPathProjection` for newly created child nodes of disabled nodes
  • Loading branch information
bwaidelich authored Oct 23, 2023
2 parents abff0bf + 1f28a14 commit 9cd8c4f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ private function whenNodeAggregateWithNodeWasCreated(NodeAggregateWithNodeWasCre
'succeedingNodeAggregateId' => $event->succeedingNodeAggregateId?->value,
'shortcutTarget' => $shortcutTarget,
'nodeTypeName' => $event->nodeTypeName->value,
'disabled' => $parentNode->getDisableLevel(),
]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ Feature: Routing behavior of removed, disabled and re-enabled nodes
| workspaceName | "live" |
| newContentStreamId | "cs-identifier" |
And the command CreateRootNodeAggregateWithNode is executed with payload:
| Key | Value |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.Neos:Sites" |
| Key | Value |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "lady-eleonode-rootford" |
| nodeTypeName | "Neos.Neos:Sites" |
And the graph projection is fully up to date

# lady-eleonode-rootford
Expand All @@ -48,7 +48,7 @@ Feature: Routing behavior of removed, disabled and re-enabled nodes
#
And I am in content stream "cs-identifier" and dimension space point {}
And the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName |
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues | nodeName |
| shernode-homes | lady-eleonode-rootford | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "ignore-me"} | node1 |
| sir-david-nodenborough | shernode-homes | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "david-nodenborough"} | node2 |
| duke-of-contentshire | sir-david-nodenborough | Neos.Neos:Test.Routing.Content | {"uriPathSegment": "ignore-me"} | node3 |
Expand Down Expand Up @@ -263,3 +263,24 @@ Feature: Routing behavior of removed, disabled and re-enabled nodes
And The documenturipath projection is up to date
Then No node should match URL "/nody/earl-document"
And The node "leaf-mc-node" in content stream "cs-identifier" and dimension "{}" should resolve to URL "/nody/earl-document/leaf"

Scenario: Add child node underneath disabled node and re-enable parent (see https://github.com/neos/neos-development-collection/issues/4639)
When the command "DisableNodeAggregate" is executed with payload:
| Key | Value |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| coveredDimensionSpacePoint | {} |
| nodeVariantSelectionStrategy | "allVariants" |
And the graph projection is fully up to date
When the following CreateNodeAggregateWithNode commands are executed:
| nodeAggregateId | parentNodeAggregateId | nodeTypeName | initialPropertyValues |
| nody-mc-nodeface-child | nody-mc-nodeface | Neos.Neos:Test.Routing.Page | {"uriPathSegment": "nody-child"} |
And The documenturipath projection is up to date
When the command "EnableNodeAggregate" is executed with payload:
| Key | Value |
| contentStreamId | "cs-identifier" |
| nodeAggregateId | "nody-mc-nodeface" |
| coveredDimensionSpacePoint | {} |
| nodeVariantSelectionStrategy | "allVariants" |
When I am on URL "/nody/nody-child"
Then the matched node should be "nody-mc-nodeface-child" in content stream "cs-identifier" and dimension "{}"

0 comments on commit 9cd8c4f

Please sign in to comment.