6

I am using magento 1.9 C.E and I have this issue whenever I try to disable any module from app/etc/modules/Mymodule_Custom.xml

    <active>false</false>

It throws the error Mage_Module_Helper_Data not found. I don't understand why it is coming and this is the problem with almost all the extensions that I'm using. Please help me out folks.

Teja Bhagavan Kollepara
  • 3,816
  • 5
  • 32
  • 69

1 Answers1

4

The error

The error comes from the fact that the helper class of the module you're disabling is being used somewhere else in the code. For example, it could be:

  • In another module
  • In the templates

Find the file using it

So first, you need to find out what is the name of the helper.

To do so, open app/code/<codePool>/Mymodule/Custom/etc/config.xml and look for the following piece of code:

<helpers>
    <module>
        <class>Mymodule_Custom_Helper</class>
    </module>
</helpers>

Here you have to take note the name of the node between <helpers> and <class>. In my example, it is module

Now, you need to find out where this helper name is being used.

To do so, you can use the following command on your Magento root folder:

grep -r "module" . | grep -v "app/code/<codePool>/Mymodule/Custom"

This command basically means:

Look for the string module in my Magento folder but exclude the result from app/code/<codePool>/Mymodule/Custom

Thanks to this command you should be able to find where your helper is being used outside of your module quickly.

Notice: the command above will not exclude the templates or layout files from the module. Thus if your helper is being used in the module templates/layouts those files will be displayed in the list. To avoid that you can add extra grep to the command for instance:

grep -r "module" . | grep -v "app/code/<codePool>/Mymodule/Custom" | grep -v "app/design/frontend/base/default/template/mymodule/custom"

Once you found the code

Once you've found the code, I can't tell you what to do as it's a case by case decision. If you're disabling the module, you should definitely remove that helper call and/or refactor the file where it's being used.

Raphael at Digital Pianism
  • 70,385
  • 34
  • 188
  • 352