I'm creating a CakePHP application but whenever an Exception is thrown (e.g. Security exceptions amongst others) any custom helpers are not loaded. This causes the page to error and the helper not loaded error is displayed instead of the exception.
My helpers are all loaded in AppController and I have no problem with them most of the time. I've just added the Security component to protect against CSRF but whenever I simulate CSRF, I get the following error:
Notice (8): Undefined property: View::$HelperName [CORE/Cake/View/View.php, line 804] View::__get() - CORE/Cake/View/View.php, line 804 include - APP/View/Layouts/default.ctp, line 105 View::_evaluate() - CORE/Cake/View/View.php, line 908 View::_render() - CORE/Cake/View/View.php, line 872 View::renderLayout() - CORE/Cake/View/View.php, line 527 View::render() - CORE/Cake/View/View.php, line 471 Controller::render() - CORE/Cake/Controller/Controller.php, line 959 ExceptionRenderer::_outputMessage() - CORE/Cake/Error/ExceptionRenderer.php, line 263 ExceptionRenderer::error400() - CORE/Cake/Error/ExceptionRenderer.php, line 209 ExceptionRenderer::render() - CORE/Cake/Error/ExceptionRenderer.php, line 165 ErrorHandler::handleException() - CORE/Cake/Error/ErrorHandler.php, line 127 [main] - [internal], line ??
It is only ever my custom helpers though, never the core ones. I want to display the exception error and for the custom helper to be included as helps with a core part of the layout.
Any help you can give will be fantastic.