From b63bb4ef84051e6a415ed1c9d854249c6f8163e2 Mon Sep 17 00:00:00 2001 From: Matthew O'Loughlin Date: Wed, 31 Aug 2016 09:52:02 +0930 Subject: [PATCH] The private-content-version cookie is required for the frontend to AJAX fetch private block content. Current behaviour dictates that only POST requests will generate the cookie, leaving sessions initially lacking it and causing private content to remain unloaded. See also: issue #3890. --- lib/internal/Magento/Framework/App/PageCache/Version.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/App/PageCache/Version.php b/lib/internal/Magento/Framework/App/PageCache/Version.php index 272ad8ce5c02f..b5327b940b42e 100644 --- a/lib/internal/Magento/Framework/App/PageCache/Version.php +++ b/lib/internal/Magento/Framework/App/PageCache/Version.php @@ -75,7 +75,7 @@ protected function generateValue() */ public function process() { - if ($this->request->isPost()) { + if ($this->request->isPost() || is_null($this->cookieManager->getCookie(self::COOKIE_NAME))) { $publicCookieMetadata = $this->cookieMetadataFactory->createPublicCookieMetadata() ->setDuration(self::COOKIE_PERIOD) ->setPath('/')