Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUGFIX: Show the right error message if only child is published #3634

Open
wants to merge 6 commits into
base: 9.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions Classes/Controller/BackendServiceController.php
Expand Up @@ -22,6 +22,7 @@
use Neos\ContentRepository\Core\Feature\WorkspaceRebase\Command\RebaseWorkspace;
use Neos\ContentRepository\Core\Projection\ContentGraph\VisibilityConstraints;
use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregateCurrentlyDoesNotExist;
use Neos\ContentRepository\Core\SharedModel\Exception\NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint;
use Neos\ContentRepository\Core\SharedModel\Workspace\WorkspaceName;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\FlowQuery\FlowQuery;
Expand Down Expand Up @@ -231,9 +232,16 @@ public function publishAction(array $nodeContextPaths, string $targetWorkspaceNa
)
)->block();
} catch (NodeAggregateCurrentlyDoesNotExist $e) {
throw new NodeAggregateCurrentlyDoesNotExist(
'Node could not be published, probably because of a missing parentNode. Please check that the parentNode has been published.',
1682762156
throw new \RuntimeException(
$this->getLabel('NodeNotPublishedMissingParentNode'),
1705053430,
$e
);
} catch (NodeAggregateDoesCurrentlyNotCoverDimensionSpacePoint $e) {
throw new \RuntimeException(
$this->getLabel('NodeNotPublishedParentNodeNotInCurrentDimension'),
1705053432,
$e
);
}

Expand Down
6 changes: 6 additions & 0 deletions Resources/Private/Translations/en/Main.xlf
Expand Up @@ -394,6 +394,12 @@
<trans-unit id="errorBoundary.footer" xml:space="preserve">
<source>For more information about the error please refer to the JavaScript console.</source>
</trans-unit>
<trans-unit id="NodeNotPublishedMissingParentNode" xml:space="preserve">
<source>Node could not be published, probably because of a missing parentNode. Please check that the parentNode has been published.</source>
</trans-unit>
<trans-unit id="NodeNotPublishedParentNodeNotInCurrentDimension" xml:space="preserve">
<source>Node could not be published, probably because the parentNode does not exist in the current dimension. Please check that the parentNode has been published.</source>
</trans-unit>
</body>
</file>
</xliff>