diff --git a/src/Twig/RichEditorExtension.php b/src/Twig/RichEditorExtension.php index 9f140bc1..885b3cc7 100644 --- a/src/Twig/RichEditorExtension.php +++ b/src/Twig/RichEditorExtension.php @@ -292,6 +292,11 @@ private function isAdmin(array $context): bool return false; } + // If we are on the SyliusCmsPagePlugin preview page, we need to load Shop templates. + if ('monsieurbiz_cms_page_admin_page_preview' === $request->get('_route')) { + return false; + } + return self::ADMIN_FIREWALL_CONTEXT === $request->get('_firewall_context'); } }