diff --git a/Classes/Controller/WorkspaceController.php b/Classes/Controller/WorkspaceController.php index a76443d..2ba5e17 100644 --- a/Classes/Controller/WorkspaceController.php +++ b/Classes/Controller/WorkspaceController.php @@ -447,11 +447,13 @@ public function deleteAction(WorkspaceName $workspaceName): void * Rebase the current users personal workspace onto the given $targetWorkspace and then * redirects to the $targetNode in the content module. */ - public function rebaseAndRedirectAction(Node $targetNode, Workspace $targetWorkspace): void + public function rebaseAndRedirectAction(string $targetNode, Workspace $targetWorkspace): void { $contentRepositoryId = SiteDetectionResult::fromRequest($this->request->getHttpRequest()) ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); + // todo legacy uri node address notation used. Should be refactored to use json encoded NodeAddress + $targetNodeAddress = NodeAddressFactory::create($contentRepository)->createCoreNodeAddressFromLegacyUriString($targetNode); /** @var ?Account $currentAccount */ $currentAccount = $this->securityContext->getAccount(); @@ -482,10 +484,10 @@ public function rebaseAndRedirectAction(Node $targetNode, Workspace $targetWorks */ $targetNodeAddressInPersonalWorkspace = NodeAddress::create( - $targetNode->contentRepositoryId, + $targetNodeAddress->contentRepositoryId, $personalWorkspace->workspaceName, - $targetNode->dimensionSpacePoint, - $targetNode->aggregateId + $targetNodeAddress->dimensionSpacePoint, + $targetNodeAddress->aggregateId ); if ($this->packageManager->isPackageAvailable('Neos.Neos.Ui')) { @@ -526,13 +528,14 @@ public function publishNodeAction(string $nodeAddress, WorkspaceName $selectedWo ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); - $nodeAddress = $nodeAddressFactory->createFromUriString($nodeAddress); + // todo legacy uri node address notation used. Should be refactored to use json encoded NodeAddress + $nodeAddress = $nodeAddressFactory->createCoreNodeAddressFromLegacyUriString($nodeAddress); $command = PublishIndividualNodesFromWorkspace::create( $selectedWorkspace, NodeIdsToPublishOrDiscard::create( new NodeIdToPublishOrDiscard( - $nodeAddress->nodeAggregateId, + $nodeAddress->aggregateId, $nodeAddress->dimensionSpacePoint ) ), @@ -563,13 +566,14 @@ public function discardNodeAction(string $nodeAddress, WorkspaceName $selectedWo ->contentRepositoryId; $contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId); $nodeAddressFactory = NodeAddressFactory::create($contentRepository); - $nodeAddress = $nodeAddressFactory->createFromUriString($nodeAddress); + // todo legacy uri node address notation used. Should be refactored to use json encoded NodeAddress + $nodeAddress = $nodeAddressFactory->createCoreNodeAddressFromLegacyUriString($nodeAddress); $command = DiscardIndividualNodesFromWorkspace::create( $selectedWorkspace, NodeIdsToPublishOrDiscard::create( new NodeIdToPublishOrDiscard( - $nodeAddress->nodeAggregateId, + $nodeAddress->aggregateId, $nodeAddress->dimensionSpacePoint ) ), @@ -604,9 +608,10 @@ public function publishOrDiscardNodesAction(array $nodes, string $action, string $nodesToPublishOrDiscard = []; foreach ($nodes as $node) { - $nodeAddress = $nodeAddressFactory->createFromUriString($node); + // todo legacy uri node address notation used. Should be refactored to use json encoded NodeAddress + $nodeAddress = $nodeAddressFactory->createCoreNodeAddressFromLegacyUriString($node); $nodesToPublishOrDiscard[] = new NodeIdToPublishOrDiscard( - $nodeAddress->nodeAggregateId, + $nodeAddress->aggregateId, $nodeAddress->dimensionSpacePoint ); }