From 7eac3fe1dceaf162cb6438cd9a6a6639d2b72b96 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Sun, 12 Nov 2023 11:15:32 +0100 Subject: [PATCH] BUGFIX: 2347 Uris in preview mode are not converted --- .../Classes/Fusion/ConvertUrisImplementation.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php b/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php index 2ac84a6e28e..fb29c61b403 100644 --- a/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php +++ b/Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php @@ -15,6 +15,7 @@ namespace Neos\Neos\Fusion; use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId; +use Neos\Neos\Domain\Model\RenderingMode; use Neos\Neos\FrontendRouting\NodeAddressFactory; use Neos\ContentRepository\Core\Projection\ContentGraph\Node; use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry; @@ -114,16 +115,18 @@ public function evaluate() ), 1382624087); } + /** @var RenderingMode $renderingMode */ + $renderingMode = $this->runtime->fusionGlobals->get('renderingMode'); + if ($renderingMode->isEdit && $this->fusionValue('forceConversion') !== true) { + return $text; + } + $contentRepository = $this->contentRepositoryRegistry->get( $node->subgraphIdentity->contentRepositoryId ); $nodeAddress = NodeAddressFactory::create($contentRepository)->createFromNode($node); - if (!$nodeAddress->isInLiveWorkspace() && !($this->fusionValue('forceConversion'))) { - return $text; - } - $unresolvedUris = []; $absolute = $this->fusionValue('absolute');