php - Simple Magento 1.9.1 module helper not working (Failed to open stream) -


for intents , purposes, should working.. it's not.

structure:

  • app / etc / modules / company_modulename.xml

    <?xml version="1.0"?> <config>     <modules>         <company_modulename>             <active>true</active>             <codepool>community</codepool>             <version>1.0.0</version>         </company_modulename>     </modules> </config> 
  • app / code / community / company / modulename / etc / config.xml

<?xml version="1.0"?> <config>     <modules>         <company_modulename>         <version>1.0.0</version>         </company_modulename>     </modules>     <global>         <helpers>             <modulename>                 <class>company_modulename_helper</class>             </modulename>         </helpers>     </global>  </config> 
  • app / code / community / company / modulename / helper / data.php
<?php class company_modulename_helper_data extends mage_core_helper_abstract {   public function sayhello() {       die('hello');   } } 
  • app / design / frontend / custom / default / template / page / 2columns-right.phtml
... <?php mage::helper('modulename')->sayhello(); ?> ... 

this should die'ing word 'hello'. instead, i'm getting:

warning: include(mage/modulename/helper/data.php): failed open stream: no such file or directory in /var/www/html/testing/lib/varien/autoload.php on line 94

i've set module files' permissions 777 in case. ideas?

edit: have tried renaming data.php helper.php (also modified class name), , tried invoke mage::helper('modulename/helper')->... , expected - threw same error, changed file name looking helper.php kept using same path.

compilation off, cache disabled (clearing before each test anyway)

found problem.

the www-data user had no permissions namespace (company) directory.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -