3

I am getting the same exception over and over in the log, it actually making the log file very large over time. I'm really not sure how to even begin fixing this:

2016-01-14T05:30:34+00:00 ERR (3): 
exception 'Mage_Core_Exception' with message 'Invalid block type: ' in /chroot/home/vourwebsitec/ourwebsite.com/html/app/Mage.php:594
Stack trace:
#0 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Model/Layout.php(495): Mage::throwException('Invalid block t...')
#1 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)
#2 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'product_list.na...')
#3 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'product_list.na...')
#4 /chroot/home/vourwebsitec/ourwebsite.com/html/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 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#6 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#7 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/community/MT/Filter/controllers/Catalog/CategoryController.php(49): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#8 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): MT_Filter_Catalog_CategoryController->viewAction()
#9 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('view')
#10 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#11 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#12 /chroot/home/vourwebsitec/ourwebsite.com/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#13 /chroot/home/vourwebsitec/ourwebsite.com/html/index.php(87): Mage::run('', 'store')
#14 {main}

Here is the Updated extended log:

2016-01-16T03:26:32+00:00 ERR (3): 

Invalid block type: #0 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Model/Layout.php(495): Mage->throwException('Invalid block type: ')

#1 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Model/Layout.php(437): Mage_Core_Model_Layout->_getBlockInstance('', Array)

#2 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'product_list.name.after')

#3 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('', 'product_list.name.after')

#4 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Mage_Core_Model_Layout_Element, Mage_Core_Model_Layout_Element)

#5 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Model/Layout.php(210): Mage_Core_Model_Layout->generateBlocks(Mage_Core_Model_Layout_Element)

#6 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()

#7 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Catalog/controllers/CategoryController.php(148): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()

#8 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Catalog_CategoryController->viewAction()

#9 /chroot/home/vpagec/dev.page.com/html/app/code/local/Mirasvit/SeoFilter/Controller/Router.php(129): Mage_Core_Controller_Varien_Action->dispatch('view')

#10 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mirasvit_SeoFilter_Controller_Router->match(Mage_Core_Controller_Request_Http)

#11 /chroot/home/vpagec/dev.page.com/html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()

#12 /chroot/home/vpagec/dev.page.com/html/app/Mage.php(683): Mage_Core_Model_App->run(Array)

#13 /chroot/home/vpagec/dev.page.com/html/index.php(87): Mage->run('', 'store')
3
4

The message says that you use invalid block somewhere in the code. Stack trace log is cut. It is a PHP fault. How to fix it in Magento refer to this answer https://stackoverflow.com/a/12358464/2720986

Check the trace log near this line

#2 /chroot/home/vourwebsitec/ourwebsite.com/html/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'product_list.na...')

You'll find there the full block name. Try to find this block name in all XML layout files and CMS pages/blocks layout updates in Admin panel. Then remove this block.


UPDATE

According to the full trace log the following block is incorrect: "product_list.name.after". @Johnnyrt noted in his comment the piece of code

<catalog_category_default> 
  <reference name="content"> 
    <block name="product_list.name.after"> 
      <block type="core/template" name="dailydeal.list.countdown" template="dailydeal/list_countdown.phtml" /> 
    </block> 
  </reference> 
</catalog_category_default>

<block name="product_list.name.after"> is incorrect because it hasn't the type attribute. Two ways to solve the problem:

  • Remove <block name="product_list.name.after">. Care about validity of XML
  • Add a type attribute, i.e. "core/text_list": <block type="core/text_list" name="product_list.name.after">

Check if the the store functionality works as it should after these modifications.

4
  • Thanks, I followed the steps and I will update the questions with the extended log – Johnnyrt Jan 16 '16 at 3:31
  • Did you try to find the block product_list.name.after in XML layout files and layout updates in CMS pages and blocks? – martin_mageworx Jan 18 '16 at 4:38
  • Found this in our Daily Deal.xml: <catalog_category_default> <reference name="content"> <block name="product_list.name.after"> <block type="core/template" name="dailydeal.list.countdown" template="dailydeal/list_countdown.phtml" /> </block> </reference> </catalog_category_default> – Johnnyrt Jan 19 '16 at 2:14
  • The following record in XML layout <block name="product_list.name.after"> is incorrect because a block should have a 'type' attribute. For example look at this: <block type="core/template" name="dailydeal.list.countdown" template="dailydeal/list_countdown.phtml" /> Please remove that block and keep XML valid. Then check if the error is gone from the log file. – martin_mageworx Jan 19 '16 at 6:26
3

My suggestion:

  1. Switch back to native default/default Magento theme.
  2. If the error is still happening, disable your non Magento modules one by one to find the module causing the problem. Once you've found it, look into the related layout file and look for any block tag without a type attribute.
  3. If the error is not happening on default/default Magento theme, then it is caused by your custom theme. Search in your layout files any block tag without a type attribute.
2
  • Thanks, I tried the default, disabled everything, no luck, I still got the same exception. – Johnnyrt Jan 17 '16 at 19:52
  • Look for a block named "product_list.name.after" in your layout files that's the one breaking your code. – Raphael at Digital Pianism Jan 17 '16 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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