Content-Length: 2535 | pFad | http://github.com/sulu/SuluArticleBundle/commit/387625a7782a72e166743c7f46f44999717aabdb.patch
FA
From 387625a7782a72e166743c7f46f44999717aabdb Mon Sep 17 00:00:00 2001
From: Prokyonn
Date: Fri, 19 Jan 2024 11:16:20 +0100
Subject: [PATCH] Fix unexpected preview crash with adding preview condition
(#656)
---
Admin/ArticleAdmin.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Admin/ArticleAdmin.php b/Admin/ArticleAdmin.php
index 8e0df371..0b6aefa6 100644
--- a/Admin/ArticleAdmin.php
+++ b/Admin/ArticleAdmin.php
@@ -260,6 +260,7 @@ function(Localization $localization) {
];
}
+ $previewCondition = '(__routeAttributes.locale in availableLocales) or !__routeAttributes';
$viewCollection->add(
$this->viewBuilderFactory->createListViewBuilder(static::LIST_VIEW . '_' . $typeKey, '/:locale/' . $typeKey)
->setResourceKey(ArticleDocument::RESOURCE_KEY)
@@ -308,6 +309,7 @@ function(Localization $localization) {
->setTabCondition('shadowOn == false')
->setTabPriority(1024)
->addToolbarActions($formToolbarActionsWithType)
+ ->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);
$viewCollection->add(
@@ -318,6 +320,7 @@ function(Localization $localization) {
->setTabCondition('shadowOn == false')
->addToolbarActions($formToolbarActionsWithoutType)
->setTitleVisible(true)
+ ->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);
$viewCollection->add(
@@ -328,6 +331,7 @@ function(Localization $localization) {
->setTabCondition('shadowOn == false')
->addToolbarActions($formToolbarActionsWithoutType)
->setTitleVisible(true)
+ ->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);
$viewCollection->add(
@@ -338,6 +342,7 @@ function(Localization $localization) {
->setTabPriority(512)
->addToolbarActions($formToolbarActionsWithoutType)
->setTitleVisible(true)
+ ->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);
--- a PPN by Garber Painting Akron. With Image Size Reduction included!Fetched URL: http://github.com/sulu/SuluArticleBundle/commit/387625a7782a72e166743c7f46f44999717aabdb.patch
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy