It seems to stem from the fact that the reports/product_index_viewed table extends from the catalog/product collection and so the addFieldToFilter functions don't work as expected. The error I am receiving is as follows:
Call to a member function getBackend() on a non-object in /home/sites/magento.directshop.com.au/docs/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 822
For now I've commented out the code as it just seems to relate to counting product views for cached products, but it would be nice to have a solution. I noticed somebody else was having the same problem here: http://www.magentocommerce.com/boards/viewthread/275766/P30/#t391771
Magento 1.6.2.0
There is an issue loading the hole punched data on product pages which seems to be due to this code in HoleController.php:
It seems to stem from the fact that the reports/product_index_viewed table extends from the catalog/product collection and so the addFieldToFilter functions don't work as expected. The error I am receiving is as follows:
Call to a member function getBackend() on a non-object in /home/sites/magento.directshop.com.au/docs/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 822
For now I've commented out the code as it just seems to relate to counting product views for cached products, but it would be nice to have a solution. I noticed somebody else was having the same problem here: http://www.magentocommerce.com/boards/viewthread/275766/P30/#t391771