ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Custom 404 page on EE 2.9

July 23, 2014 5:28am

Subscribe [4]
  • #1 / Jul 23, 2014 5:28am

    Musa

    124 posts

    Hi,
    If i setup to show a custom page template for 404 errors on EE 2.9, it appends the homepage template content too below the custom 404 page template content. Did anybody face this issue or only me? How to solve this? Any Idea?

    Thanks
    Musa

  • #2 / Aug 01, 2014 2:26am

    Simple IM

    2 posts

    I have also experienced this error. “CUSTOM TEMPLATE HERE” is the entire contents of my 404.html template. Any content is displayed twice, with the associated errors.

    CUSTOM TEMPLATE HERE
    <div  solid #990000;padding-left:20px;margin:0 0 10px 0;">
    
    <h4>A PHP Error was encountered</h4>
    
    <p>Severity: Warning<br />
    Message:  ob_start(): output handler 'ob_gzhandler' cannot be used twice<br />
    Filename: core/Output.php<br />
    Line Number: 264</p>
    
    <p></div><div  solid #990000;padding-left:20px;margin:0 0 10px 0;"></p>
    
    <h4>A PHP Error was encountered</h4>
    
    <p>Severity: Notice<br />
    Message:  ob_start(): failed to create buffer<br />
    Filename: core/Output.php<br />
    Line Number: 264</p>
    
    <p></div></p>
    
    <p>CUSTOM TEMPLATE HERE<br />
    <div  solid #990000;padding-left:20px;margin:0 0 10px 0;"></p>
    
    <h4>A PHP Error was encountered</h4>
    
    <p>Severity: Notice<br />
    Message:  Array to string conversion<br />
    Filename: database/DB_active_rec.php<br />
    Line Number: 442</p>
    
    <p></div>Error Number: 1054</p>
    
    <p>Unknown column 'Array' in 'where clause'</p>
    
    <p>SELECT COUNT(*) as count<br />
    FROM (`exp_templates`)<br />
    WHERE `group_id` =  Array<br />
    AND `template_name` =  'thispagedoesnotexist'</p>
    
    <p>Filename: libraries/Template.php</p>
    
    <p></body>

  • #3 / Aug 07, 2014 10:10pm

    alexrubin

    2 posts

    In addition to custom 404s not working, any template within the default template group is also being displayed twice if the template group name is not included in the URL.

    To fix the duplicating template issue within the default template group, enable Template Route Manager and enter the template name as the route for the default template group templates.

    To fix the custom 404 display issue:

    File: /system/expressionengine/libraries/Template.php

    Add

    exit();

    after

    $this->show_404();

    on line 2132 and everything will start working correctly!

  • #4 / Aug 28, 2014 9:49am

    Brian Litzinger

    705 posts

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases