Content-Length: 240823 | pFad | http://github.com/sulu/SuluArticleBundle/commit/387625a7782a72e166743c7f46f44999717aabdb

5C Fix unexpected preview crash with adding preview condition (#656) · sulu/SuluArticleBundle@387625a · GitHub
Skip to content

Commit

Permalink
Fix unexpected preview crash with adding preview condition (#656)
Browse files Browse the repository at this point in the history
  • Loading branch information
Prokyonn authored Jan 19, 2024
1 parent 42a7600 commit 387625a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Admin/ArticleAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -308,6 +309,7 @@ function(Localization $localization) {
->setTabCondition('shadowOn == false')
->setTabPriority(1024)
->addToolbarActions($formToolbarActionsWithType)
->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);
$viewCollection->add(
Expand All @@ -318,6 +320,7 @@ function(Localization $localization) {
->setTabCondition('shadowOn == false')
->addToolbarActions($formToolbarActionsWithoutType)
->setTitleVisible(true)
->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);
$viewCollection->add(
Expand All @@ -328,6 +331,7 @@ function(Localization $localization) {
->setTabCondition('shadowOn == false')
->addToolbarActions($formToolbarActionsWithoutType)
->setTitleVisible(true)
->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);
$viewCollection->add(
Expand All @@ -338,6 +342,7 @@ function(Localization $localization) {
->setTabPriority(512)
->addToolbarActions($formToolbarActionsWithoutType)
->setTitleVisible(true)
->setPreviewCondition($previewCondition)
->setParent(static::EDIT_FORM_VIEW . '_' . $typeKey)
);

Expand Down

0 comments on commit 387625a

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/sulu/SuluArticleBundle/commit/387625a7782a72e166743c7f46f44999717aabdb

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy