I'm not 100% sure it's the additional router configuration that's triggering this error — off the top of my head there's nothing in the controller dispatch process that instantiates a helper.
The most common reason for Magento to automatically instantiate a helper is a modules="helperalias"
attribute in a configuration file. This indirectly invokes a helper's __
localization method.
Without knowing why your Magento system wants to instantiate a helper, it's impossible to know what the alias should be. If I was you I'd temporarily add something debugging code to the following file
#File: app/Mage.php
public static function helper($name)
{
//poor man's logging
file_put_contents('/tmp/test.log',"$name\n",FILE_APPEND);
// PHP's equivalent of printf debugging
var_dump($name);
$registryKey = '_helper/' . $name;
if (!self::registry($registryKey)) {
$helperClass = self::getConfig()->getHelperClassName($name);
self::register($registryKey, new $helperClass);
}
return self::registry($registryKey);
}
This will tell you what the helper's alias is, which is turn is what you should name the configuration node you're looking for.
Update: Based on the comment below, you want
<global>
<helpers>
<franchiseselect>
<class>Rhino_FranchiseSelect_Helper</class>
</franchiseselect>
</helpers>
</global>
When you say
Mage::helper('franchiseselect');
What you're really saying is
Mage::helper('franchiseselect/data');
Magento substitutes the data
string automatically. The franchiseselect
string is the alias group name, the data
string is the alias model name. When you add the node <franchiseselect>
/<what_should_this_tag_name_be/>
always to your XML you're defining the alias group name.
Also, your XML had an extra node, <resources/>
, under the <helpers/>
node — you don't need that.
As for why the Magento looked for a class under Mage
— if Magento can't find a configured alias, it automatically guesses that the request was for a class under the Mage
namespace. This guess is a bit of paranoid programming on the part of the original core team to ensure any misconfigurations in their own modules didn't trigger errors. When Magento couldn't find your framework
helper, it tried instantiating a Mage_Framework...
class.