Question

I'm having a problem with the product list in Magento 2. For the most part everything is working properly, but occasionally when I change the sort order to 'desc' or change the sort criteria to 'name' or 'price' the page breaks. It does not load all of the products that should be on the page and the page loses all javascript and css. I've included a screenshot of a page that is working in asc and breaks when flipped to desc.

Working List

Not Working List

Any suggestions on why this is happening would be appreciated!

Was it helpful?

Solution

After a bunch of digging it seems that when calculating savings for products I was occasionally calling the PHP method getUsedProductIds() on a simple product. This was causing the issues and as soon as I put in a check to only run it on configurables it cleared. Silly me.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top