From 71182ae3bb5d08ac6fc5ba5f05bf69128e89c6b5 Mon Sep 17 00:00:00 2001 From: Bartek Date: Fri, 10 Sep 2021 01:46:56 +0200 Subject: [PATCH] IBX-947: Refactored processCancel method For more details see https://github.com/ezsystems/repository-forms/pull/349 or https://issues.ibexa.co/browse/IBX-947 --- lib/Form/Processor/ContentFormProcessor.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Form/Processor/ContentFormProcessor.php b/lib/Form/Processor/ContentFormProcessor.php index d90363c5f..fa6762249 100644 --- a/lib/Form/Processor/ContentFormProcessor.php +++ b/lib/Form/Processor/ContentFormProcessor.php @@ -164,12 +164,12 @@ public function processCancel(FormActionEvent $event) if (1 === count($this->contentService->loadVersions($contentInfo))) { $parentLocation = $this->locationService->loadParentLocationsForDraftContent($versionInfo)[0]; $redirectionLocationId = $parentLocation->id; - $this->contentService->deleteContent($contentInfo); } else { $redirectionLocationId = $contentInfo->mainLocationId; - $this->contentService->deleteVersion($versionInfo); } + $this->contentService->deleteVersion($versionInfo); + $url = $this->router->generate( '_ezpublishLocation', ['locationId' => $redirectionLocationId],