One of our clients is running a Magento site that experiences intermittent problems where the home-page half-loads occasionally.
Investigating /var/log/httpd/error_log
reveals the following which appears to be the source of the problem:
[Sat Feb 28 21:05:45 2015] [error] [client ###.###.#.###] PHP Fatal error: Class 'Mage_Catalog_Model_Product' not found in /var/www/html/app/code/local/TM/Highlight/Block/Product/Abstract.php on line 40
The culprit code block in /local/TM/Highlight/Block/Product/Abstract.php
is:
$this->addData(array(
'cache_lifetime' => 86400,
'cache_tags' => array(Mage_Catalog_Model_Product::CACHE_TAG),
));
I've had a quick look at the documentation for the Mage_Catalog_Model_Product
class and it does seem that class exists and so does the constant CACHE_TAG
.
What's going on here? Is it a bug in this Abstract.php
(which has come from Templates-Master
at http://www.templates-master.com)? Is the Mage_Catalog_Model_Product
class magically being loaded sometimes and not loaded other times for some reason?