Skip to content

Commit

Permalink
BUGFIX: 2347 Uris in preview mode are not converted
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Nov 12, 2023
1 parent a549305 commit 7eac3fe
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Neos.Neos/Classes/Fusion/ConvertUrisImplementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');

Expand Down

0 comments on commit 7eac3fe

Please sign in to comment.