Skip to content

Commit 3638431

Browse files
author
Mohan Ahuja
committed
ACP2E-711: "Invalid Form Key. Please refresh the page." error occurs when changing the product limit in categories
- Used existing public const, instead of creating new one.
1 parent 3dc94ae commit 3638431

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

app/code/Magento/PageCache/ViewModel/FormKeyProvider.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
namespace Magento\PageCache\ViewModel;
99

10+
use Magento\Catalog\Model\Product\ProductList\ToolbarMemorizer;
1011
use Magento\Framework\App\Config\ScopeConfigInterface;
1112
use Magento\Framework\View\Element\Block\ArgumentInterface;
1213
use Magento\PageCache\Model\Config;
@@ -16,11 +17,6 @@
1617
*/
1718
class FormKeyProvider implements ArgumentInterface
1819
{
19-
/**
20-
* XML PATH to enable/disable saving toolbar parameters to session
21-
*/
22-
private const XML_PATH_CATALOG_REMEMBER_PAGINATION = 'catalog/frontend/remember_pagination';
23-
2420
/**
2521
* @var Config
2622
*/
@@ -60,6 +56,6 @@ public function isFullPageCacheEnabled(): bool
6056
*/
6157
public function isPaginationCacheEnabled(): bool
6258
{
63-
return $this->scopeConfig->isSetFlag(self::XML_PATH_CATALOG_REMEMBER_PAGINATION);
59+
return $this->scopeConfig->isSetFlag(ToolbarMemorizer::XML_PATH_CATALOG_REMEMBER_PAGINATION);
6460
}
6561
}

0 commit comments

Comments
 (0)