Magento 1.9 – Home Exception ‘Mage_Core_Exception’ with Message ‘Invalid Block Type’

magento-1.9

I get the error exception 'Mage_Core_Exception' with message 'Invalid block type: ' so no block is mentioned. Home is not loaded properly however. So kind of hard to debug this way. Complete trace is

2017-02-04T12:50:35+00:00 ERR (3): 
exception 'Mage_Core_Exception' with message 'Invalid block type: ' in /home/user/prelaunch.domain.com/app/Mage.php:595
Stack trace:
#0 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
#2 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'content')
#3 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'content')
#4 /home/user/prelaunch.domain.com/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/user/prelaunch.domain.com/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#6 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Controller/Varien/Action.php(269): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#7 /home/user/prelaunch.domain.com/app/code/core/Mage/Adminhtml/Controller/Action.php(275): Mage_Core_Controller_Varien_Action->loadLayout(NULL, true, true)
#8 /home/user/prelaunch.domain.com/app/code/local/Magestore/Megamenu/controllers/Adminhtml/MegamenuController.php(472): Mage_Adminhtml_Controller_Action->loadLayout()
#9 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Magestore_Megamenu_Adminhtml_MegamenuController->cacheAction()
#10 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('cache')
#11 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#12 /home/user/prelaunch.domain.com/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#13 /home/user/prelaunch.domain.com/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#14 /home/user/prelaunch.domain.com/index.php(88): Mage::run('', 'store')
#15 {main}

Regular error log only reports an error from earlier on:

[Sat Feb 04 05:00:26 2017] [error] [client xx.xxx.xxx.xxx] File does not exist: /home/user/prelaunch.domain.com/js/lr_callprice/jquery.min.map

Any ideas how I can debug this properly?

Best Answer

As in the answer by alan storm, the issue is related to a block where you have not added a type for a block. e.g.

<block name="checkout.cart">

Where in your case, it seems something like this,

<block name="content">

When you find above code, Update it with

<reference name="content">

and complete <reference> tag instead of <block> tag.

I have a search script which can be useful for finding this error in your code,
Once you add search.php file in your magento root folder, run it like yordomain.com/search.php search for <block name="content"> keyword in xml files.
You will find the file which needs to be updated.

Related Topic