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?
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 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:
- Clear cache ( System > Cache management )
- If you are using compilation, disable it or run recompile ( System > Tools > Compilation )
I hope this will help you.