Welcome Guest, Not a member yet? Register   Sign In
404 override page error
#1

(This post was last modified: 11-16-2014, 09:52 AM by heisenberg.)

Hi,
i'm trying to override default 404 error page but i get this error below. I'm using HMVC wiredesignz extension.
Quote:edit:
it only happens if a class exists.
e.g
class_that_exists/method_that_doesnt_exist - give throws warning

class_that_doesnt_exists/really/deep/parameter/list - show 404 overrided page
Code:
A PHP Error was encountered

Severity: Warning

Message: call_user_func_array() expects parameter 1 to be a valid callback, class 'Users' does not have a method 'page_not_found'

Filename: core/CodeIgniter.php

Line Number: 359

PHP Code:
//config/routes.php
//[...]
$route['404_override'] = 'templates/page_not_found'

PHP Code:
//templates controller
    
public function page_not_found() {
        
$this->output->set_status_header('404');
        
$data['page_title'] = "404 - la pagina non esiste";
        
$data['view_file'] = '404';
        
$data['module'] = 'templates';
        
$this->load->view('page'$data);
    } 

view "page"
PHP Code:
<!DOCTYPE html>
<
html lang="en">
    <?
php $this->load->view('head'?>

    <!-- ======== @Region: body ======== -->
    <body class="page page-index">
        <a href="#content" class="sr-only">Skip to content</a> 

        <!-- ======== @Region: #navigation ======== -->

        <?php $this->load->view('navigation'?>

        <!-- ======== @Region: #highlighted ======== -->

        <!-- ======== @Region: #content ======== -->
        <div id="content">
            <div class="container">
                <?php
                $this
->load->view($module "/" $view_file);
                
?>
            </div>
        </div>

        <!-- ======== @Region: #content-below ======== -->
        <?php $this->load->view('footer'); ?>
        <!--Hidden elements - excluded from jPanel Menu on mobile-->

        <?php
        $this
->load->view('modals');

        
$this->load->view('scripts');
        
?>

    </body>
</html> 
Reply




Theme © iAndrew 2016 - Forum software by © MyBB