diff --git a/Neos.ContentRepository/Classes/Domain/Service/PublishingService.php b/Neos.ContentRepository/Classes/Domain/Service/PublishingService.php index 7e94b871b9c..0c352dea3df 100644 --- a/Neos.ContentRepository/Classes/Domain/Service/PublishingService.php +++ b/Neos.ContentRepository/Classes/Domain/Service/PublishingService.php @@ -182,8 +182,11 @@ protected function doDiscardNode(NodeInterface $node, array &$alreadyDiscardedNo if ($possibleShadowNodeData instanceof NodeData) { if ($possibleShadowNodeData->getMovedTo() !== null) { $parentBasePath = $node->getPath(); - $affectedChildNodeDataInSameWorkspace = $this->nodeDataRepository->findByParentAndNodeType($parentBasePath, null, $node->getWorkspace(), null, false, true); - foreach ($affectedChildNodeDataInSameWorkspace as $affectedChildNodeData) { + $affectedChildNodeDataInWorkspaceChain = $this->nodeDataRepository->findByParentAndNodeType($parentBasePath, null, $node->getWorkspace(), null, false, true); + foreach ($affectedChildNodeDataInWorkspaceChain as $affectedChildNodeData) { + if (!$affectedChildNodeData->matchesWorkspaceAndDimensions($node->getWorkspace(), $node->getDimensions())) { + continue; + } /** @var NodeData $affectedChildNodeData */ $affectedChildNode = $this->nodeFactory->createFromNodeData($affectedChildNodeData, $node->getContext()); $this->doDiscardNode($affectedChildNode, $alreadyDiscardedNodeIdentifiers);