diff --git a/Classes/Controller/PageController.php b/Classes/Controller/PageController.php
index e5430c4..de0a0f1 100644
--- a/Classes/Controller/PageController.php
+++ b/Classes/Controller/PageController.php
@@ -14,10 +14,9 @@
* source code.
*/
-use Neos\ContentRepository\Domain\Model\NodeInterface;
+use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\Flow\Mvc\Controller\ActionController;
use Neos\Flow\Mvc\Exception\StopActionException;
-use Neos\Neos\Controller\Frontend\NodeController;
class PageController extends ActionController
{
@@ -25,22 +24,12 @@ class PageController extends ActionController
/**
* Redirects request to the given node in preview mode without the neos backend
*
- * @param NodeInterface $node
+ * @param Node $node
* @throws StopActionException
*/
- public function renderPreviewPageAction(NodeInterface $node): void
+ public function renderPreviewPageAction(Node $node): void
{
- $previewAction = 'preview';
-
- # Neos 5.x uses the 'preview' action which also sets cache headers
- # So for Neos 4.x we have to add the cache headers and use the 'show' action
- if (!method_exists(NodeController::class, 'previewAction')) {
- $previewAction = 'show';
- /** @noinspection PhpUndefinedMethodInspection */
- $this->response->getHeaders()->setCacheControlDirective('no-cache, no-store, must-revalidate');
- }
-
- $this->forward($previewAction, 'Frontend\Node', 'Neos.Neos', [
+ $this->forward('preview', 'Frontend\Node', 'Neos.Neos', [
'node' => $node,
'yoastSeoPreviewMode' => true,
]);
diff --git a/Resources/Private/Fusion/Components/Application.fusion b/Resources/Private/Fusion/Components/Application.fusion
index 6d5527e..8d7785b 100644
--- a/Resources/Private/Fusion/Components/Application.fusion
+++ b/Resources/Private/Fusion/Components/Application.fusion
@@ -2,7 +2,7 @@ prototype(Yoast.YoastSeoForNeos:Component.Application) < prototype(Neos.Fusion:T
attributes {
class = 'yoast-seo__application'
id = 'yoast-app'
- data-configuration = Neos.Fusion:RawArray {
+ data-configuration = Neos.Fusion:DataStructure {
title = ${q(documentNode).property('title')}
titleOverride = ${q(documentNode).property('titleOverride')}
description = ${q(documentNode).property('metaDescription')}
@@ -17,7 +17,7 @@ prototype(Yoast.YoastSeoForNeos:Component.Application) < prototype(Neos.Fusion:T
workerUrl = Neos.Fusion:ResourceUri {
path = 'resource://Yoast.YoastSeoForNeos/Public/Assets/webWorker.js'
}
- previewUrl = ${'/neosyoastseo/page/renderPreviewPage?node=' + String.rawUrlEncode(documentNode.contextPath)}
+ previewUrl = ${'/neosyoastseo/page/renderPreviewPage?node=' + String.rawUrlEncode(Neos.Node.serializedNodeAddress(documentNode))}
baseUrl = Yoast.YoastSeoForNeos:BaseUri
siteUrl = Neos.Neos:NodeUri {
node = ${q(site).context({workspaceName: 'live'}).get(0)}
@@ -30,8 +30,8 @@ prototype(Yoast.YoastSeoForNeos:Component.Application) < prototype(Neos.Fusion:T
// Default url to check for the favicon if not set as link tag in the html head with `rel="shortcut icon"` or `rel="icon"`.
faviconSrc = ${this.siteUrl + '/favicon.ico'}
- breadcrumbs = Neos.Fusion:RawCollection {
- collection = ${Array.reverse(q(documentNode).parents('[instanceof Neos.Neos:Document]').get())}
+ breadcrumbs = Neos.Fusion:Map {
+ items = ${Array.reverse(q(documentNode).parents('[instanceof Neos.Neos:Document]').get())}
itemRenderer = ${q(item).property('uriPathSegment')}
}
diff --git a/Resources/Private/Fusion/Documents/YoastSeoView.fusion b/Resources/Private/Fusion/Documents/YoastSeoView.fusion
index 06bb13f..270cf90 100644
--- a/Resources/Private/Fusion/Documents/YoastSeoView.fusion
+++ b/Resources/Private/Fusion/Documents/YoastSeoView.fusion
@@ -4,7 +4,7 @@ prototype(Yoast.YoastSeoForNeos:Documents.YoastSeoView) < prototype(Neos.Neos:Pa
head {
stylesheets >
- stylesheets = Neos.Fusion:Array {
+ stylesheets = Neos.Fusion:Join {
main = afx`
@@ -21,7 +21,7 @@ prototype(Yoast.YoastSeoForNeos:Documents.YoastSeoView) < prototype(Neos.Neos:Pa
node = ${node}
site = ${site}
- renderer = Neos.Fusion:Array {
+ renderer = Neos.Fusion:Join {
appWrapper = afx`
diff --git a/composer.json b/composer.json
index a1a7b45..87f1d32 100644
--- a/composer.json
+++ b/composer.json
@@ -23,11 +23,12 @@
],
"homepage": "https://yoast.com",
"require": {
- "php": ">=7.4",
- "neos/neos": "^7.3 || ^8.3",
- "neos/neos-ui": "^7.3 || ^8.3",
- "neos/seo": "~3.0",
- "ext-json": "*"
+ "php": "^8.2",
+ "ext-json": "*",
+
+ "neos/neos": "^9.0",
+ "neos/neos-ui": "^9.0",
+ "neos/seo": "~4.1"
},
"replace": {
"shel/neos-yoast-seo": "self.version"