diff --git a/Classes/Application/PublishChangesInDocument/PublishChangesInDocumentCommandHandler.php b/Classes/Application/PublishChangesInDocument/PublishChangesInDocumentCommandHandler.php
index d090fdb815..0119da7c5e 100644
--- a/Classes/Application/PublishChangesInDocument/PublishChangesInDocumentCommandHandler.php
+++ b/Classes/Application/PublishChangesInDocument/PublishChangesInDocumentCommandHandler.php
@@ -15,6 +15,7 @@
namespace Neos\Neos\Ui\Application\PublishChangesInDocument;
use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Exception\WorkspaceRebaseFailed;
+use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Exception\PartialWorkspaceRebaseFailed;
use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregateCurrentlyDoesNotExist;
use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
@@ -23,6 +24,7 @@
use Neos\Neos\Domain\Service\WorkspacePublishingService;
use Neos\Neos\Ui\Application\Shared\ConflictsOccurred;
use Neos\Neos\Ui\Application\Shared\PublishSucceeded;
+use Neos\Neos\Ui\Application\Shared\PartialPublishFailed;
use Neos\Neos\Ui\Controller\TranslationTrait;
use Neos\Neos\Ui\Infrastructure\ContentRepository\ConflictsFactory;
@@ -51,7 +53,8 @@ final class PublishChangesInDocumentCommandHandler
*/
public function handle(
PublishChangesInDocumentCommand $command
- ): PublishSucceeded|ConflictsOccurred {
+ ): PublishSucceeded|ConflictsOccurred|PartialPublishFailed
+ {
try {
$publishingResult = $this->workspacePublishingService->publishChangesInDocument(
$command->contentRepositoryId,
@@ -67,6 +70,25 @@ public function handle(
numberOfAffectedChanges: $publishingResult->numberOfPublishedChanges,
baseWorkspaceName: $workspace?->baseWorkspaceName?->value
);
+ } catch (WorkspaceRebaseFailed $e) {
+ $conflictsFactory = new ConflictsFactory(
+ contentRepository: $this->contentRepositoryRegistry
+ ->get($command->contentRepositoryId),
+ nodeLabelGenerator: $this->nodeLabelGenerator,
+ workspaceName: $command->workspaceName,
+ preferredDimensionSpacePoint: $command->preferredDimensionSpacePoint
+ );
+
+ return new ConflictsOccurred(
+ conflicts: $conflictsFactory->fromWorkspaceRebaseFailed($e)
+ );
+ } catch (PartialWorkspaceRebaseFailed $e) {
+ $workspace = $this->contentRepositoryRegistry->get($command->contentRepositoryId)->findWorkspaceByName(
+ $command->workspaceName
+ );
+ return new PartialPublishFailed(
+ baseWorkspaceName: $workspace?->baseWorkspaceName?->value
+ );
} catch (NodeAggregateCurrentlyDoesNotExist $e) {
throw new \RuntimeException(
$this->getLabel('NodeNotPublishedMissingParentNode'),
@@ -79,18 +101,7 @@ public function handle(
1705053432,
$e
);
- } catch (WorkspaceRebaseFailed $e) {
- $conflictsFactory = new ConflictsFactory(
- contentRepository: $this->contentRepositoryRegistry
- ->get($command->contentRepositoryId),
- nodeLabelGenerator: $this->nodeLabelGenerator,
- workspaceName: $command->workspaceName,
- preferredDimensionSpacePoint: $command->preferredDimensionSpacePoint
- );
- return new ConflictsOccurred(
- conflicts: $conflictsFactory->fromWorkspaceRebaseFailed($e)
- );
}
}
}
diff --git a/Classes/Application/Shared/PartialPublishFailed.php b/Classes/Application/Shared/PartialPublishFailed.php
new file mode 100644
index 0000000000..bbfc4438db
--- /dev/null
+++ b/Classes/Application/Shared/PartialPublishFailed.php
@@ -0,0 +1,36 @@
+ get_object_vars($this)
+ ];
+ }
+}
diff --git a/Resources/Private/Translations/en/PublishingDialog.xlf b/Resources/Private/Translations/en/PublishingDialog.xlf
index 3c86b9ce2b..7ca6fab54b 100644
--- a/Resources/Private/Translations/en/PublishingDialog.xlf
+++ b/Resources/Private/Translations/en/PublishingDialog.xlf
@@ -218,6 +218,15 @@
+
+
+
+
+
+
+
+
+