1

I've went through a lot of articles discussing how to solve the error, and yet 3 hours later i cant find the cause of the problem, I'm getting the Helper not found error when navigating to the module admin page at http://www.appfactory.loc/magento/index.php/admin/push/index/key/17deed03960db48c69ef02d8d3f54768/:

Fatal error: Class 'Mage_Appfactory_Push_Helper_Data' not found in C:\Development\stage\grantorino-appfactory-ab\magento\app\Mage.php on line 547

My configurations are as follows: config.xml

<?xml version="1.0"?>
<config>
  <modules>
    <AppFactory_Push>
      <version>1.0</version>
    </AppFactory_Push>
  </modules>

  <global>
    <helpers>
      <Push>
        <class>AppFactory_Push_Helper</class>
      </Push>
    </helpers>

    <models>
        <Push>
            <class>AppFactory_Push_Model</class>
            <resourceModel>Push_resource</resourceModel>
        </Push>
        <Push_resource>
            <class>AppFactory_Push_Model_Resource</class>
            <entities>
                <Push>
                    <table>appfactory_push</table>
                </Push>
            </entities>
        </Push_resource>
    </models>

    <resources>
        <Push_setup>
            <setup>
                <module>AppFactory_Push</module>
                <class>AppFactory_Push_Model_Resource_Setup</class>
            </setup>
        </Push_setup>
    </resources>

    <blocks>
        <Push>
            <class>AppFactory_Push_Block</class>
        </Push>
    </blocks>

  </global>

  <admin>
      <routers>
          <adminhtml>
              <args>
                  <modules>
                      <AppFactory_Push after="Mage_Adminhtml">AppFactory_Push_Adminhtml</AppFactory_Push>
                  </modules>
              </args>
          </adminhtml>
      </routers>
  </admin>

  <adminhtml>
      <layout>
          <updates>
              <appfactory_push>
                  <file>appfactory_push.xml</file>
              </appfactory_push>
          </updates>
      </layout>
  </adminhtml>

  <default>
      <Push>
        <view>
            <enabled>1</enabled>
            <amazon_access_key_id></amazon_access_key_id>
            <amazon_secret_access_key></amazon_secret_access_key>
            <amazon_region>us-west-2</amazon_region>
            <amazon_arn></amazon_arn>
            <amazon_topic>3</amazon_topic>
        </view>
    </Push>
  </default>

</config> 

adminhtml.xml

<?xml version="1.0"?>

<config>
    <menu>
         <basic>
            <children>
                <manage>
                    <title>Push Notifications</title>
                    <action>adminhtml/push</action>
                    <sort_order>3</sort_order>
                </manage>
            </children>
         </basic>
    </menu>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <Push>
                                        <title>App Factory Push Notifications</title>
                                    </Push>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>      
</config>

Helper File C:\Development\stage\grantorino-appfactory-ab\magento\app\code\local\AppFactory\Push\Helper\Data.php

<?php
class AppFactory_Push_Helper_Data extends Mage_Core_Helper_Abstract {

}
2
  • Are Compilation and cache disabled? No apc / varnish? Are files readable? Pls also post your helper path and the file contents.
    – Amasty
    Commented Oct 11, 2014 at 11:19
  • @Amasty just added the file to the question, nop all cache disabled, files very readable Commented Oct 11, 2014 at 11:40

2 Answers 2

2

Create a file named Data.php in app/code/local/AppFactory/Push/Helper with the following content:

<?php
class Appfactory_Push_Helper_Data extends Mage_Core_Helper_Abstract {
}

and the error should be gone. If not, change the translator module to something like 'core' instead of 'yourmodule'.

The error is normally because you are trying to translate a string without the proper module and it gives a blank page.

It might be anywhere in the .php files, call normally is Mage::helper('somemodule')->__('string') or inside the .xml files is something like translate="" module=""

9
  • i already have it :(, i added the file to the question Commented Oct 11, 2014 at 11:40
  • Change the translator module to something like 'core' instead of 'yourmodule'. The error is normally because you are trying to translate a string without the proper module and it gives a blank page.
    – mbalparda
    Commented Oct 11, 2014 at 11:46
  • where? im not adding any translate attributes in the xml Commented Oct 11, 2014 at 11:49
  • It might be anywhere in the .php files, call normally is Mage::helper('somemodule')->__('string') or inside the .xml files is something like translate="" module=""
    – mbalparda
    Commented Oct 11, 2014 at 11:51
  • but if its not in the xml or php files it wont be called, right? Commented Oct 11, 2014 at 11:55
1

I think there is a problem in acl. Try below code

    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <Push translate="title" module="AppFactory_Push">
                                        <title>App Factory Push Notifications</title>
                                    </Push>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>    

It will most probably work.

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.