Not sure what's wrong with this, have been googling around but cannot find a solution, hopefully someone can help me here.

exception 'Mage_Core_Exception' with message 'Invalid block type: Mage_Catalog_Block_Layer' in app/Mage.php:563
Stack trace:
#0 app/code/core/Mage/Core/Model/Layout.php(469): Mage::throwException('Invalid block t...')
#1 app/code/core/Mage/Core/Model/Layout.php(411): Mage_Core_Model_Layout->_getBlockInstance('catalog/layer', Array)
#2 app/code/core/Mage/Core/Model/Layout.php(446): Mage_Core_Model_Layout->createBlock('catalog/layer', 'catalog.leftnav')
#3 app/code/core/Mage/Core/Model/Layout.php(238): Mage_Core_Model_Layout->addBlock('catalog/layer', 'catalog.leftnav')
#4 app/code/core/Mage/Core/Model/Layout.php(204): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Mod el_Layout_Element))
#5 app/code/core/Mage/Core/Model/Layout.php(209): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 app/code/core/Mage/Core/Controller/Varien/Action.php(345): Mage_Core_Model_Layout->generateBlocks()
#7 app/code/core/Mage/Catalog/controllers/CategoryController.php(146): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 app/code/local/Xprime/Category/controllers/CategoryController.php(75): Mage_Catalog_CategoryController->viewAction()
#9 app/code/core/Mage/Core/Controller/Varien/Action.php(420): Xprime_Category_CategoryController->viewAction()
#10 app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('view')
#11 app/code/core/Mage/Core/Controller/Varien/Front.php(176): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_ Http))
#12 app/code/core/Mage/Core/Model/App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#13 app/Mage.php(640): Mage_Core_Model_App->run(Array)
#14 roa/index.php(80): Mage::run('en_roa', 'store')
#15 {main}

1 Answer 1


The only file which is not from the core from the trace is this file:


First try disabling the Xprime_Category module and see if the error is still here.

If not, look into the viewAction function of this file.

You will probably find some code loading and rendering the layout.

Look for the module frontend layout xml file and look for the following code:

<block type="catalog/layer" />

That's the part of the code causing the issue.

Debugging will depend on the case and what this block is supposed to be used for.

Magento default layer block type is "catalog/layer_view".

I suggest you look into the base/default catalog.xml to see how a default install handles the layer code.

EDIT: Also check if the module has got its own layer block. If it does, I reckon it is the block supposed to be used instead of the original Magento block and it is not called properly.

  • Thanks @Digital Pianism, this is very detailed solution. And below is my findings. 1. By going to the config.xml of the Xprime_Category module, I can see it is using a customise layout file called xp_category.xml. see code snippet below, <layout> <updates> <xp_category module="Xprime_Category"> <file>xp_category.xml</file> </xp_category> </updates> </layout> 2. on xp_category.xml <block type="catalog/layer" name="catalog.leftnav" after="currency" template="catalog/layer/view.phtml"/>
    – ankermarco
    Commented Sep 23, 2015 at 13:41
  • Yes that's the issue, in the xp_category.xml file, change type="catalog/layer" to type="catalog/layer_view", that should fix the issue. Commented Sep 23, 2015 at 13:46
  • thanks so much again, I really appreciate your prompt help!
    – ankermarco
    Commented Sep 23, 2015 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.