There are at least a half dozen StackOverflow posts with quite similar issues and I've gone through all the comments on them. Eg: A, B, C. I've deleted the cache, turned off the compilation, set permissions, all to no avail. At first, I had some extra whitespace in my XML, but once I deleted that, I am now hitting the Data helper loading issue. It's getting the Mage namespace instead of my extension's Namespace.
I've got some frontend controllers, observers, and models working fine following these great videos and now going through Alan Storm's admin menu tutorial. I refreshed the admin page and now the header prints, but the entire admin below the header is not rendering due to a warning getting thrown.
In the log I see this:
2016-02-12T23:20:54+00:00 ERR (3): Warning: include(Mage/Namespace/Package/Helper/Data.php): failed to open stream: No such file or directory in /var/www/magento1/lib/Varien/Autoload.php on line 94
2016-02-12T23:20:54+00:00 ERR (3): Warning: include(): Failed opening 'Mage/Namespace/Package/Helper/Data.php' for inclusion (include_path='/var/www/magento1/app/code/local:/var/www/magento1/app/code/community:/var/www/magento1/app/code/core:/var/www/magento1/lib:.:/usr/share/php:/usr/share/pear') in /var/www/magento1/lib/Varien/Autoload.php on line 94
Now obviously the Helper class at app/code/community/Namespace/Package/Helper/Data.php is not being autoloaded correctly:
class Namespace_Package_Helper_Data extends Mage_Core_Helper_Abstract
{
public function test()
{
echo 'Helper loaded';
}
}
Here's the relevant portion of app/code/community/Namespace/Package/etc/config.xml
<config>
<global>
<helpers>
<namespace>
<class>Namespace_Package_Helper</class>
</namespace>
</helpers>
</global>
</config>
Note: I have frontend controllers, models, and observers already in this extension working fine and I've now started work on the admin side, this is the first time I've tried to add any adminhtml or admin controllers to the custom extension.
I don't even intend to use this Helper per se but it is needed for admin.
If I do this in /test.php:
$helper = Mage::helper('namespace/data');
$helper->test();
the helper is autoloaded and it prints "Helper loaded".