0

Fatal Error :Mage_News_Helper_Data' not found in magento directory/app/Mage.php on line 547

I created a new module for mage_news, eventhougth it shows the error. What do I have to do?

  • It's not recommend to use 'Mage' as namespace for your custom module. – MagePsycho Dec 30 '15 at 6:46
  • 1
    Can you please show system.xml file & config.xml – Amit Bera Dec 30 '15 at 7:03
1

It is pretty common magento error. Even if you yourself don’t use helper, Magento admin does. You should always create helper class in your custom module. File location depends on module code pool and could be located in

[magento_root]/app/code/local/[company]/[module]/helper/Data.php

or

[magento_root]/app/code/community/[company]/[module]/helper/Data.php

Sample file content:

<?php
class Company_Module_Helper_Data extends Mage_Core_Helper_Abstract
{
}

Besides creating the Company_Module_Helper_Data class, you need to add class mapping to your config.xml

 <config>
        ...
        <global>
          <helpers>
            <module>
              <class>Company_Module_Helper</class>
            </module>
          </helpers>
        </global>
        ...
    </config>

If you have created Data.php and has class mapping in config.xml, try following:

  1. Clear cache ( System > Cache management )
  2. If you are using compilation, disable it or run recompile ( System > Tools > Compilation )

I hope this will help you.

| improve this answer | |

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