From 4b08d26e80dfa96a0ef865a65173bb1e12ea89c9 Mon Sep 17 00:00:00 2001 From: Dominik Rott <61696649+Dominikrt@users.noreply.github.com> Date: Sat, 20 Jul 2024 19:03:24 +0200 Subject: [PATCH] fix: backend article preview 'shop' cookie --- engine/Shopware/Controllers/Backend/Article.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/Shopware/Controllers/Backend/Article.php b/engine/Shopware/Controllers/Backend/Article.php index 81a134cb8e9..5aa4692a5a4 100644 --- a/engine/Shopware/Controllers/Backend/Article.php +++ b/engine/Shopware/Controllers/Backend/Article.php @@ -2261,7 +2261,9 @@ public function previewDetailAction() ] ); - $this->Response()->headers->setCookie(new Cookie('shop', (string) $shopId, 0, $shop->getBasePath())); + $cookieExpire = time() + 30; + $this->Response()->headers->setCookie(new Cookie('shop', (string) $shopId, $cookieExpire, $shop->getBasePath())); + $this->redirect($url); }