diff --git a/Neos.ContentRepository/Classes/Domain/Model/Node.php b/Neos.ContentRepository/Classes/Domain/Model/Node.php index 13909e0aebd..6f6b0df8882 100644 --- a/Neos.ContentRepository/Classes/Domain/Model/Node.php +++ b/Neos.ContentRepository/Classes/Domain/Model/Node.php @@ -1743,6 +1743,10 @@ protected function createRecursiveCopy(NodeInterface $referenceNode, string $nod } /** @var $childNode Node */ foreach ($this->getChildNodes() as $childNode) { + // Don't copy removed nodes + if ($childNode->isRemoved()) { + continue; + } // Prevent recursive copy when copying into itself if ($childNode->getIdentifier() !== $copiedNode->getIdentifier()) { $childNode->copyIntoInternal($copiedNode, $childNode->getName(), $detachedCopy); diff --git a/Neos.ContentRepository/Classes/Domain/Model/NodeData.php b/Neos.ContentRepository/Classes/Domain/Model/NodeData.php index ca5d7d581e2..e4e7959efe5 100644 --- a/Neos.ContentRepository/Classes/Domain/Model/NodeData.php +++ b/Neos.ContentRepository/Classes/Domain/Model/NodeData.php @@ -763,7 +763,7 @@ public function similarize(AbstractNodeData $sourceNode, $isCopy = false) 'hiddenAfterDateTime', 'hiddenBeforeDateTime', 'hiddenInIndex', - 'accessRoles' + 'accessRoles', ]; if (!$isCopy) { $propertyNames[] = 'creationDateTime'; @@ -771,6 +771,7 @@ public function similarize(AbstractNodeData $sourceNode, $isCopy = false) } if ($sourceNode instanceof NodeData) { $propertyNames[] = 'index'; + $propertyNames[] = 'removed'; } foreach ($propertyNames as $propertyName) { ObjectAccess::setProperty($this, $propertyName, ObjectAccess::getProperty($sourceNode, $propertyName));