When I click a Product, it gives me error page. Says it is the mini-cart
Question
I am using the Harvest Template on Magento 1.9 and the template is from Themeforest. My biggest question is how do I either Disable the minicart for a little bit if not required or is this a Theme issue or a Configuration issue? Magento is large enough I am sure it isn't a bug. It's my first Magento site, but I do know code.
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Checkout_Block_Cart_Minicart' in /home/st3rnz/public_html/newcumberlandpro/app/Mage.php:595
protected function _getBlockInstance($block, array $attributes=array())
{
if (is_string($block)) {
if (strpos($block, '/')!==false) {
if (!$block = Mage::getConfig()->getBlockClassName($block)) {
Mage::throwException(Mage::helper('core')->__('Invalid block type: %s', $block));
}
}
if (class_exists($block, false) || mageFindClassFile($block)) {
$block = new $block($attributes);
}
}
if (!$block instanceof Mage_Core_Block_Abstract) {
Mage::throwException(Mage::helper('core')->__('Invalid block type: %s', $block));
}
return $block;
}
The function above is the offending function from the layout.php file, and the last Mage::throwException is the line of code that gave the error.
2016-03-30T15:07:34+00:00 ERR (3):
exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Checkout_Block_Cart_Minicart' in /home/st3rnz/public_html/newcumberlandpro/app/Mage.php:595
Stack trace:
#0 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('checkout/cart_m...', Array)
#2 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('checkout/cart_m...', 'minicart_head')
#3 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('checkout/cart_m...', 'minicart_head')
#4 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#5 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home')
#9 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home')
#10 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#11 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#12 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home/st3rnz/public_html/newcumberlandpro/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/st3rnz/public_html/newcumberlandpro/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#15 /home/st3rnz/public_html/newcumberlandpro/index.php(87): Mage::run('', 'store')
#16 {main}
Solution
Mage_Checkout_Block_Cart_Minicart
is a core block which comes under Mage_Checkout
module. So in normal case, the chance of occurrence of this error is NIL unless that file is missing.
So I seriously suspect that file is missing in your Magento instance. Please check it and replace it with Minicart.php
file corresponding to your magento version.
You can check whether the file exist at : app\code\core\Mage\Checkout\Block\Cart\Minicart.php
. If it is not there, please place Minicart.php file there.