-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report
Description
I'm not sure exactly if the root of the problem is with an issue on a swatch attribute or that the category only has one product, but nonetheless, it causes $result to never be assigned in the following class:
\Magento\Swatches\Block\Product\Renderer\Listing on function getSwatchAttributesData():
protected function getSwatchAttributesData()
{
$swatchAttributeData = parent::getSwatchAttributesData();
foreach ($swatchAttributeData as $attributeId => $item) {
if (!empty($item['used_in_product_listing'])) {
$result[$attributeId] = $item;
}
}
return $result;
}
The end result is that in production, the category is displayed, but there's no products listed.
I ended up overriding the class on my end and applied $result = [];
prior to the foreach loop which seemed to have fixed it. I'm not sure if it'll cause issues anywhere else though.
Metadata
Metadata
Assignees
Labels
Issue: Ready for WorkGate 4. Acknowledged. Issue is added to backlog and ready for developmentGate 4. Acknowledged. Issue is added to backlog and ready for developmentbug report