From aa426aa641bd1b6f02c9df7ba162520993edc474 Mon Sep 17 00:00:00 2001 From: Patric Eckhart Date: Thu, 4 Apr 2024 19:28:01 +0200 Subject: [PATCH] The order which resources, their thumbnails and assets are deleted is changed. The asset, thumbnail remove stuff before the resource remove. --- Neos.Flow/Classes/Command/ResourceCommandController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Neos.Flow/Classes/Command/ResourceCommandController.php b/Neos.Flow/Classes/Command/ResourceCommandController.php index dcb2ec7b95..fd92235b17 100644 --- a/Neos.Flow/Classes/Command/ResourceCommandController.php +++ b/Neos.Flow/Classes/Command/ResourceCommandController.php @@ -279,7 +279,6 @@ public function cleanCommand() $resource->getCollectionName() ]); $resource->disableLifecycleEvents(); - $this->resourceRepository->remove($resource); if ($mediaPackagePresent && $assetRepository !== null && $thumbnailRepository !== null) { if (isset($relatedAssets[$resource])) { foreach ($relatedAssets[$resource] as $asset) { @@ -294,6 +293,7 @@ public function cleanCommand() } } } + $this->resourceRepository->remove($resource); $this->persistenceManager->persistAll(); } $brokenResourcesCounter = count($brokenResources);