Cannot load custom helper from the root "helpers" directory
Permalink
Hi,
In the root "helpers" directory (in the same level with the "concrete" directory), I have created a file named: menu.php.
Now, when I try to load it through Loader::helper('menu') I recieve the following error:
Warning: require_once(C:\xampp\htdocs\BK\concrete/helpers/menu.php): failed to open stream: No such file or directory in C:\xampp\htdocs\BK\concrete\core\libraries\loader.php on line 297
It seems like the Loader didn't even try to load the helper from the root "helpers" directory.
I'm running concrete 5.6.2.1 (the latest at this time of writing).
In the root "helpers" directory (in the same level with the "concrete" directory), I have created a file named: menu.php.
Now, when I try to load it through Loader::helper('menu') I recieve the following error:
Warning: require_once(C:\xampp\htdocs\BK\concrete/helpers/menu.php): failed to open stream: No such file or directory in C:\xampp\htdocs\BK\concrete\core\libraries\loader.php on line 297
It seems like the Loader didn't even try to load the helper from the root "helpers" directory.
I'm running concrete 5.6.2.1 (the latest at this time of writing).
To speed things up, concrete5 doesn't look in these 'outside' folders if the overrides cache is turned on. Once you turn off the Overrides Cache and concrete5 sees a new file in the helpers folder, it will remember that it's there and you can turn the Overrides Cache back on again. While you're developing your site, it's always best to turn all your caching off or you'll go insane with these types of issues.