Skip to content

Commit 5a997fd

Browse files
MAGETWO-98748: Incorrect behavior in the category menu on the Storefront
1 parent 63f34c6 commit 5a997fd

File tree

4 files changed

+0
-94
lines changed

4 files changed

+0
-94
lines changed

app/code/Magento/Catalog/Plugin/Block/Topmenu.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
*/
1515
class Topmenu
1616
{
17-
/**
18-
* Cache tag for menu block
19-
*/
20-
private $cacheTag = "top_menu";
21-
2217
/**
2318
* Catalog category
2419
*
@@ -124,7 +119,6 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
124119
$subject->addIdentity(Category::CACHE_TAG);
125120
$rootId = $this->storeManager->getStore()->getRootCategoryId();
126121
$storeId = $this->storeManager->getStore()->getId();
127-
$currentCategory = $this->getCurrentCategory();
128122
/** @var \Magento\Catalog\Model\ResourceModel\Category\Collection $collection */
129123
$collection = $this->getCategoryTree($storeId, $rootId);
130124
$mapping = [$rootId => $subject->getMenu()]; // use nodes stack to avoid recursion
@@ -134,9 +128,6 @@ public function beforeGetIdentities(\Magento\Theme\Block\Html\Topmenu $subject)
134128
}
135129
$subject->addIdentity(Category::CACHE_TAG . '_' . $category->getId());
136130
}
137-
if ($currentCategory) {
138-
$subject->addIdentity($this->cacheTag . '_' . Category::CACHE_TAG . '_' . $currentCategory->getId());
139-
}
140131
}
141132

142133
/**

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
<element name="expandAll" type="button" selector=".tree-actions a:last-child"/>
1414
<element name="categoryTreeRoot" type="text" selector="div.x-tree-root-node>li.x-tree-node:first-of-type>div.x-tree-node-el:first-of-type" timeout="30"/>
1515
<element name="categoryInTree" type="text" selector="//a/span[contains(text(), '{{name}}')]" parameterized="true" timeout="30"/>
16-
<element name="categoryHighlighted" type="text" selector="//ul[@id='ui-id-2']//li//a/span[contains(text(),'{{name}}')]/../.." parameterized="true" timeout="30"/>
17-
<element name="categoryNotHighlighted" type="text" selector="ul[id=\'ui-id-2\'] li[class~=\'active\']" timeout="30"/>
1816
<element name="categoryInTreeUnderRoot" type="text" selector="//li/ul/li[@class='x-tree-node']/div/a/span[contains(text(), '{{name}}')]" parameterized="true"/>
1917
<element name="lastCreatedCategory" type="block" selector=".x-tree-root-ct li li:last-child" />
2018
<element name="treeContainer" type="block" selector=".tree-holder" />

app/code/Magento/Catalog/Test/Mftf/Test/CheckCurrentCategoryIsHighlightedAndProductsDisplayed.xml

Lines changed: 0 additions & 73 deletions
This file was deleted.

app/code/Magento/Theme/Block/Html/Topmenu.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,6 @@ protected function getCacheLifetime()
7474
return parent::getCacheLifetime() ?: 3600;
7575
}
7676

77-
/**
78-
* Get cache key informative items
79-
*
80-
* @return array
81-
*/
82-
public function getCacheKeyInfo()
83-
{
84-
return array_merge(parent::getCacheKeyInfo(), $this->getIdentities());
85-
}
86-
8777
/**
8878
* Get top menu html
8979
*

0 commit comments

Comments
 (0)