Closed
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.