Welcome Guest, Not a member yet? Register   Sign In
404_override doesn't work as expected..
#11

[eluser]Glazz[/eluser]
Hello,

Thanks, but i'm getting the same error =\

Screenshot of the error: http://img692.imageshack.us/img692/7479/...uesweb.png

If you need, i can post some of my views so you can see them.

- G l a z z
#12

[eluser]Eric Barnes[/eluser]
Yea if you can post the topo view that would be great.
#13

[eluser]Glazz[/eluser]
Hello,

I've attached a zip file.
#14

[eluser]Eric Barnes[/eluser]
It is loading the view, however having trouble with the cart library. Is that auto loaded? If not it may not be loaded in your 404 controller
#15

[eluser]Glazz[/eluser]
Yes it is autoloading.

Edit:
My autoload.php
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it.  This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Helper files
| 4. Custom config files
| 5. Language files
| 6. Models
|
*/

/*
| -------------------------------------------------------------------
|  Auto-load Packges
| -------------------------------------------------------------------
| Prototype:
|
|  $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/

$autoload['packages'] = array(APPPATH.  'third_party');


/*
| -------------------------------------------------------------------
|  Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in the system/libraries folder
| or in your application/libraries folder.
|
| Prototype:
|
|    $autoload['libraries'] = array('database', 'session', 'xmlrpc');
*/

$autoload['libraries'] = array('lang', 'database', 'session', 'cart', 'form_validation', 'ion_auth');


/*
| -------------------------------------------------------------------
|  Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
|    $autoload['helper'] = array('url', 'file');
*/

$autoload['helper'] = array('fusephase', 'url', 'number', 'form', 'breadcrumb');


/*
| -------------------------------------------------------------------
|  Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
|    $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files.  Otherwise, leave it blank.
|
*/

$autoload['config'] = array('fusephase');


/*
| -------------------------------------------------------------------
|  Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
|    $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file.  For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/

$autoload['language'] = array('fusephase', 'fusephase_textos', 'email');


/*
| -------------------------------------------------------------------
|  Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
|    $autoload['model'] = array('model1', 'model2');
|
*/

$autoload['model'] = array();


/* End of file autoload.php */
/* Location: ./application/config/autoload.php */
#16

[eluser]rogerwaldrup[/eluser]
No fix yet and I too am experiencing an issue using CI 2.0.0
#17

[eluser]Unknown[/eluser]
Code:
http://domain.com/existing-directory/non-controller

or

Code:
http://domain.com/existing-directory/existing-directory/non-controller

etc...

It shows default CI error page too.
#18

[eluser]Glazz[/eluser]
Hello,

I've been testing, and this error happens with most of the libraries.

I tried to fix it but i didn't have success with it :c
#19

[eluser]thePiet[/eluser]
I'm suffering the same issue here.

application/routes.php:

Code:
$route['404_override'] = 'error/not_found';

application/controllers/error.php:

Code:
<?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.
#20

[eluser]victorche[/eluser]
for some reason, the autoloaded libraries are not loaded :/
i have the same problem too...




Theme © iAndrew 2016 - Forum software by © MyBB