The MU forums have moved to WordPress.org

404 page not appearing properly (6 posts)

  1. Allen Brown
    Member
    Posted 14 years ago #

    I have just upgraded to 2.8.4 using the standard approach and while checking the site, I found the 404 page behaves peculiarly:

    http://www.oldracingcars.info/dufflink

    That looks like the bottom of the sidebar followed by the footer.

    I'm using the standard 404 page and the standard .htaccess but my own theme. All the other pages work fine.

    If I use the default theme I get a similar problem but instead of that piece of HTML I get (in Chrome):

    This web page is not available.

    The web page at null might be temporarily down or it may have moved permanently to a new web address.

    More information on this error

    Firefox showed me a blank page and Safari told me the server was busy.

    What have I done wrong?

  2. tim.moore
    Member
    Posted 14 years ago #

    Are you running any plugins? Have you tried the site without them?

    Also check file permissions. They should be 0644 or 0755.

    I'd also check through your template and make sure that nothing funky is happening (closing PHP tags too early, using ob_start functions, etc).

  3. Allen Brown
    Member
    Posted 14 years ago #

    Thanks Tim

    The only Plug-ins I'm using are:

    1. Last Modified (Displays the date and time that the post/page was last modified.)
    2. Search Pages (This makes search queries look at pages and posts instead of only posts. Based off of Rob Schluter's hack.)

    I tried disabling them and still got the same problem.

    File permissions look ok and I get the problem with the default template so I don't think it's in the template (but will look harder as soon as I finish posting this).

    It may be a clue that when I checked it again just now, much more HTML was showing because I've added more pages into the site as I recover whatever happened yesterday - and therefore the list of pages in the sidebar has grown.

    It's as if the first X characters of the header and sidebar aren't being displayed and X is remaining constant. So the browser gets the second half of the HTML and can't make sense of it.

  4. Allen Brown
    Member
    Posted 14 years ago #

    Sorry - template and theme are not the same thing!

    Here's my sidebar template - it's mild modification of a very old standard so I wonder if there's anything in here that no longer works:

    <div id="sidebar">
        <div id="purpose"></div>
    	<div id="searchform">
    	  <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    	</div>
    
    		<ul>
    			<li>
    			<?php /* If this is a 404 page */ if (is_404()) { ?>
    			<?php /* If this is a category archive */ } elseif (is_category()) { ?>
    			<p>You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
    
    			<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
    			for the day <?php the_time('l, F jS, Y'); ?>.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
    			for <?php the_time('F, Y'); ?>.</p>
    
    			<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    			<p>You are currently browsing the <a href="<?php bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives
    			for the year <?php the_time('Y'); ?>.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
    			<p>You have searched <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a>
    			for <strong>'<?php echo wp_specialchars($s); ?>'</strong>. If you are unable to find anything in these search results, you can try one of these links.</p>
    
    			<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    			<p>You are currently browsing the <a href="<?php echo bloginfo('home'); ?>/"><?php echo bloginfo('name'); ?></a> weblog archives.</p>
    
    			<?php } ?>
    			</li>
    
    			<?php wp_list_pages('exclude=6&title_li=<h3>Pages</h3>' ); ?>
    
    			<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    				<?php get_links_list(); ?>
    
    			<?php } ?>
    
    		</ul>
      </div>
  5. Allen Brown
    Member
    Posted 14 years ago #

    In desperation, I have reduced my 404 template to just this:

    <html>
    
    <body>
    
    <ul>
      <?php wp_list_pages(''); ?>
    </ul>
    
    </body>
    </html>

    I still get only the last part of the HTML.

    http://www.oldracingcars.info/dufflinkagain

    Can anyone make a suggestion?

  6. codeautom8r
    Member
    Posted 14 years ago #

    Your sidebar template looks okay. It really seems like something might be using output buffering, which is then messing things up. I'm really not sure beyond that.

    <tim>

About this Topic

  • Started 14 years ago by Allen Brown
  • Latest reply from codeautom8r