3

While creating the new page in Admin panel, getting the error as Fatal error: Class 'Ddevs_Ebayaff_Helper_Data' not found in /var/www/html/bitkarshop/app/Mage.php on line 547 My config files are as follows..

In app\code\local\Ddevs\Ebayaff\etc\adminhtml.xml

<config>
    <menu>
       <main_menu translate="title" module="example">
           <title>Main Menu</title>
               <sort_order>1</sort_order>
               <children>
               <sub_menu1 translate="title" >
                    <title>Sub Menu 1</title>
                    <sort_order>10</sort_order>
                    <action>adminhtml/submenu1</action>
               </sub_menu1>
               </children>
       </main_menu>
   </menu>
</config>

In app\code\local\Ddevs\Ebayaff\etc\config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Ddevs_Ebayaff>
            <version>0.1.0</version>
        </Ddevs_Ebayaff>
    </modules>
    <global>
        <resources>
            <add_category_attribute>
                <setup>
                    <module>Ddevs_Ebayaff</module>
                    <class>Mage_Eav_Model_Entity_Setup</class>
                </setup>
            </add_category_attribute>
        </resources>

        <helpers>
      <example>
         <class>Ddevs_Ebayaff_Helper</class>
      </example>
   </helpers>
    </global>
....

In app\code\local\Ddevs\Ebayaff\Helper\Data.php

<?

class Ddevs_Ebayaff_Helper_Data extends Mage_Core_Helper_Data{          

} 

Once going to Admin panel i am getting the following error.

Fatal error: Class 'Ddevs_Ebayaff_Helper_Data' not found in /var/www/html/bitkarshop/app/Mage.php on line 547

3 Answers 3

3

You are missing <?php tag.

Change this

<?

class Ddevs_Ebayaff_Helper_Data extends Mage_Core_Helper_Data{          

}

to

<?php
class Ddevs_Ebayaff_Helper_Data extends Mage_Core_Helper_Data
{          

}
2

You are either missing the helper definition in config.xml:

<config>
  ...
  <global>
    ...
    <helpers>
      <ddevs_ebayaff>
        <class>Ddevs_Ebayaff_Helper</class>
      </ddevs_ebayaff>
    </helpers>
    ...

or should add module="example" to adminhtml.xml, the <sub_menu1 translate="title" > node

<sub_menu1 translate="title" module="example" >

Edit

As a best practice, if you're using a translate attribute, you should also define a module default helper.

1

in file

app\code\local\Ddevs\Ebayaff\Helper\Data.php It should be modified as below

<?php

class Ddevs_Ebayaff_Helper_Data extends Mage_Core_Helper_Data{          

} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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