Search code examples
magento-1.5magento

Magento Getting Fatal error with custom module


I am getting following error : Class 'Lucky_Test_Helper_Data' not found in E:\wamp\www\raj\magento_new\app\Mage.php on line 521

I created this module using module creator. I checked it with one of my magento installation, it worked fine. Then I copied the module to the actually installation where I wanted to use it.

I did a some debugging, and found that if I comment certain part of config.xml I get no error.

I figured that out after having a look at stack trace of error, which included following line.
include( 'E:\wamp\www\raj\magento_new\app\design\adminhtml\default\default\template\page\menu.phtml' );

here is my config.xml

now if I comment :


    <!--<test module="test">
    <title>Test</title>
    <sort_order>71</sort_order>               
    <children>
    <items module="test">
    <title>Manage Test </title>
    <sort_order>0</sort_order>
    <action>test/adminhtml_test</action>
    </items>
    </children>
    </test>-->

I get no error. Module seems to be loading fine till this point. Do you see anything wrong? Help me out.


Solution

  • You have to explicitly define that you are using helpers, like this:

    <global>
        <helpers>
            <test>
                <class>Lucky_Test_Helper</class>
            </test>
        </helpers>
    </global>
    

    In the menu you define with module="test" that your module handles the translation for it