Skip to content

Commit 48f313f

Browse files
glo32232wip44850
andauthored
AC-15223: QPT Patch - After store switch page comes from cache(Store switcher not working) in 2.4.8 (#206)
* AC-15223: QPT Patch - After store switch page comes from cache(Store switcher not working) in 2.4.8 --------- Co-authored-by: Abhishek Pathak <[email protected]>
1 parent dfb067c commit 48f313f

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

patches/os/AC-15223_2.4.8.patch

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
diff --git a/vendor/magento/module-page-cache/Model/App/Request/Http/IdentifierForSave.php b/vendor/magento/module-page-cache/Model/App/Request/Http/IdentifierForSave.php
2+
index cbb3c34db6cbc..09ce18fe731a4 100644
3+
--- a/vendor/magento/module-page-cache/Model/App/Request/Http/IdentifierForSave.php
4+
+++ b/vendor/magento/module-page-cache/Model/App/Request/Http/IdentifierForSave.php
5+
@@ -13,6 +13,7 @@
6+
use Magento\Framework\App\PageCache\IdentifierInterface;
7+
use Magento\Framework\App\Request\Http;
8+
use Magento\Framework\Serialize\Serializer\Json;
9+
+use Magento\Framework\App\Response\Http as ResponseHttp;
10+
11+
/**
12+
* Page unique identifier
13+
@@ -49,11 +50,10 @@ public function getValue()
14+
$data = [
15+
$this->request->isSecure(),
16+
preg_replace($pattern, $replace, (string)$this->request->getUriString()),
17+
- $this->context->getVaryString()
18+
+ $this->request->get(ResponseHttp::COOKIE_VARY_STRING)
19+
+ ?: $this->context->getVaryString()
20+
];
21+
-
22+
$data = $this->identifierStoreReader->getPageTagsWithStoreCacheTags($data);
23+
-
24+
return sha1($this->serializer->serialize($data));
25+
}
26+
}

support-patches.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
}
1313
}
1414
},
15+
"AC-15223": {
16+
"categories": [
17+
"Cache"
18+
],
19+
"title": "Fixes an issue in 2.4.8 storefront where, after switching stores, the page is served from cache and does not reflect the selected store.",
20+
"packages": {
21+
"magento/magento2-base": {
22+
">=2.4.8 <2.4.8-p2": {
23+
"file": "os/AC-15223_2.4.8.patch"
24+
}
25+
}
26+
}
27+
},
1528
"AC-14984": {
1629
"categories": [
1730
"Other"

0 commit comments

Comments
 (0)