I’ve been seeing this error since enabling logging—I’ve done a fair amount of research, including this one—http://www.magentocommerce.com/boards/v/viewthread/281275/ --but this one isn’t as clear—the block is empty and I can’t work out which file the error is in. I’ve been through all the .xml files of extensions we’ve added and they all seem to be ok.
What could be causing this? Using Magento 1.7.0.2.
I see this text in the error ‘checkout.cart’
1. Try searching your layout files for this text and see what comes up.
2. Maybe you have some extension installed that should override the some checkout block and it fails. Try disabling extension one by one.
3. If none of the above work you can try to add in Mage_Core_Model_Layout this line:
Mage::log($_SERVER['REQUEST_URI']);
before any occurence of thes lines:
Mage::throwException(Mage::helper('core')->__('Invalid block type: %s', $block)); // you should find 2 occurences //and Mage::throwException(Mage::helper('core')->__('Invalid block type: %s', $type)); // - one occurence
Then check your logs again.
You should get an idea of what page does this so you can narrow your search area.
Good luck.
Marius.
Here is a strange/ funny story.
Yesterday afternoon I was looking through the code of a Magento Website trying to make a plan for an upgrade.
Among others I took a look in the exception.log file and I found this error:
exception 'Mage_Core_Exception' with message 'Invalid block type: ' in ..... .... #2 xxxxx/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('', 'checkout.cart')
Looks familiar?
After investigating the layout files I found this in app/design/frontend/{interface}/{theme}/layout/local.xml
and everything is OK now.
Unfortunately I don’t think this is an extension, maybe the guy that did the theme added this.
You can try searching in the layout files for something like this: ‘<block name="checkout.cart">’ maybe you find your problem.
I am having the exact same execption.log error message as you are--even down to the same exact php line numbers.
Were you ever able to resolve this issue? My site appears to be working just fine, but I am anal and would really like to get rid of this error message!
Hi dvincent, no, I didn’t to be honest. Like you, my site seems to work just fine, and in the end I decided not to worry about it… I had a hunch it was going to take a bit to track down and figured I could better spend my time elsewhere.
Just ran into this issue as well. In my case it was caused by moving code from a case insensitive environment (OSX) to a case sensitive one (Linux). Once I fixed the file name casing, the problem was gone.
Check to make sure the first letter of directory and filenames are properly uppercased in modules.