Skip to content

Commit

Permalink
The order which resources, their thumbnails and assets are deleted is…
Browse files Browse the repository at this point in the history
… changed. The asset, thumbnail remove stuff before the resource remove.
  • Loading branch information
patriceckhart authored Apr 4, 2024
1 parent 6b1efba commit aa426aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Neos.Flow/Classes/Command/ResourceCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -294,6 +293,7 @@ public function cleanCommand()
}
}
}
$this->resourceRepository->remove($resource);
$this->persistenceManager->persistAll();
}
$brokenResourcesCounter = count($brokenResources);
Expand Down

0 comments on commit aa426aa

Please sign in to comment.