Magento “Wrong tab configuration ….”
I made myself this problem today, and lost a half an hour trying to figure out what was wrong. So I decided to write a blog post about it, just so I don’t forget.
I had to add new tab to order view in admin area of Magento. I did everything by the book, but for some reason, when I refreshed the order view I got an error report screen. And the report said:
Whaaaat?!?!?! But, but, but…. I’ve set up everything correctly! Then next half an hour I was changing this and that before I decided to open Mage_Adminhtml_Block_Widget_Tabs and put echo “here” in various places in function addTab. At the end I saw that when I dumped the $tab variable it was:
So I remembered. I didn’t have any blocks defined in this module prior to this one – have I even set up block class in my config.xml? I checked the config.xml and of course there was no block class setup.
So to solve the error. all I had to do is add this to my config.xml file:
<global> .... <blocks> <mymodule> <class>My_Module_Block</class> </mymodule> </blocks> ..... </global>