I’m suffering the same issue here.
application/routes.php:
$route['404_override'] = 'error/not_found';
application/controllers/error.php:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Error extends CI_Controller {
function __construct()
{
parent::__construct();
}
*snip*
function not_found()
{
$this->breadcrumb->append('Pagina niet gevonden');
$this->load->view('header');
$this->load->view('error/not_found');
$this->load->view('footer');
}
}
As you can see I’m using a breadcrumb class to handle breadcrumbs. But this happens when throwing the 404 error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Error::$breadcrumb
Filename: controllers/error.php
Line Number: 30
Fatal error: Call to a member function append() on a non-object in application/controllers/error.php on line 30
So it looks like libraries that are auto-loaded, aren’t loaded anymore or something. Manually loading the libraries in the controller doesn’t affect the error.
In short, it isn’t possible to use other libraries / helpers / plugins within the 404_override route.