Closed
Description
Steps to reproduce
- Install Magento from
develop
branch. - Add two widgets of type 'Catalog Product List' to the 'CMS homepage' at location content.bottom with different titles, but the same conditions. For example, condition could be product price is greater than 0
- Refresh cache and visit homepage
Expected result
- Two widgets appear on homepage with the same products, but different titles.
Actual result
- First widget loaded shows twice depending on sort order
- See: Magento\CatalogWidget\Block\Product\ProductList::getCacheKeyInfo which doesn't take into consideration the widget_id.
/**
* Get key pieces for caching block content
*
* @return array
*/
public function getCacheKeyInfo()
{
$conditions = $this->getData('conditions')
? $this->getData('conditions')
: $this->getData('conditions_encoded');
return [
'CATALOG_PRODUCTS_LIST_WIDGET',
$this->_storeManager->getStore()->getId(),
$this->_design->getDesignTheme()->getId(),
$this->httpContext->getValue(\Magento\Customer\Model\Context::CONTEXT_GROUP),
intval($this->getRequest()->getParam(self::PAGE_VAR_NAME, 1)),
$this->getProductsPerPage(),
$conditions
];
}
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Failed. Automatic verification of issue format is failedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.1 releaseThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release