Skip to content

Commit

Permalink
TASK: Adjust LinkingService to not use legacy node address
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Jun 16, 2024
1 parent 97c9445 commit ba79300
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Neos.Neos/Classes/Service/LinkingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
use Neos\Neos\Domain\Model\Site;
use Neos\Neos\Domain\Repository\SiteRepository;
use Neos\Neos\Exception as NeosException;
use Neos\Neos\FrontendRouting\NodeAddressFactory;
use Neos\Neos\FrontendRouting\SiteDetection\SiteDetectionResult;
use Neos\Utility\Arrays;
use Psr\Http\Message\UriInterface;
Expand Down Expand Up @@ -309,15 +308,15 @@ public function createNodeUri(
$controllerContext->getRequest()->getHttpRequest()
)->contentRepositoryId;
$contentRepository = $this->contentRepositoryRegistry->get($contentRepositoryId);
$nodeAddress = NodeAddressFactory::create($contentRepository)->createFromUriString($node);
$nodeAddress = NodeAddress::fromJsonString($nodeString);
$workspace = $contentRepository->getWorkspaceFinder()->findOneByName($nodeAddress->workspaceName);
$subgraph = $contentRepository->getContentGraph($nodeAddress->workspaceName)->getSubgraph(
$nodeAddress->dimensionSpacePoint,
$workspace && !$workspace->isPublicWorkspace()
? VisibilityConstraints::withoutRestrictions()
: VisibilityConstraints::frontend()
);
$node = $subgraph->findNodeById($nodeAddress->nodeAggregateId);
$node = $subgraph->findNodeById($nodeAddress->aggregateId);
} catch (\Throwable $exception) {
if ($baseNode === null) {
throw new NeosException(
Expand Down

0 comments on commit ba79300

Please sign in to comment.