Welcome Guest, Not a member yet? Register   Sign In
Help! Google Toolbar & 404 Status
#1

[eluser]beaudierman[/eluser]
I've found a really strange problem when users with Google Toolbar hit any page with a custom 404 on it.

If you browse to this page while using Google Toolbar(with "Provide suggestions on navigation errors" turned on):
http://dev1.katom.com/test/ing/this/response

It will be completely broken about 8 out of 10 tries. If I remove the explicit 404 header,

Code:
$this->output->set_status_header(404);

then the page will work every single time.

Here is my error controller source:

Code:
class Error extends CI_Controller {

public function __construct()
{
  parent::__construct();
  $this->load->library(array('session', 'cart', 'form_validation', 'encrypt'));
  $this->load->helper(array('url', 'form', 'cookie'));
  $this->output->enable_profiler(false);
}

public function index()
{
  $data['title'] = 'Page Not Found - KaTom Restaurant Supply';
  $data['page'] = 'error';
  $data['metaDescription'] = '';
  
  $this->output->set_status_header(404);
  
  $this->load->view('templates/header', $data);
  $this->load->view('error/404_page', $data);
  $this->load->view('templates/footer', $data);
}
}

My 404_page source is just html, no php or anything. This issue still happens without the header and footer files so I didn't see a reason to paste their sources as well.

Has anyone else ran into this issue before? I've tested it on 3 different servers with different versions of PHP/Apache and Linux and the result has been the same.

Here is a screen shot of the "broken" page with the 404 header turned on:
http://img837.imageshack.us/img837/9222/...7at307.png
#2

[eluser]beaudierman[/eluser]
Bump.

I found out that many other sites are also suffering from this problem, such as bing:

http://www.bing.com/trash
#3

[eluser]CroNiX[/eluser]
I'm not sure what you're after here? You have an optional browser plugin that you voluntarily installed that is interfering with your normal browsing experience. It seems you should be asking the maker of that plugin to fix it (since it is happening on sites that aren't built on CI as well, such as Bing), or uninstall it so your browser works normally again. If the plugin doesn't handle standard 404 headers correctly I'm not sure what can (or should) really be done about that by anyone except the plugin manufacturer.
#4

[eluser]beaudierman[/eluser]
I was asking here in hopes that someone else had run into this problem before. I had already emailed and posted on the Google forums about this but the odds on them rolling out a fix as fast as someone posting in my thread are slim at best. I appreciate the response but I wanted to exhaust all possibilities before telling a client that there is no workaround and any visitor with Google Toolbar is out of luck if they run into a 404 page.
#5

[eluser]CroNiX[/eluser]
Totally understand. I just don't see how it would be possible to get around a browser plugin not handling the standard HTTP 404 header that is as old as the web itself. It's not like an HTML element that can just be tweaked to work in a specific browser.

You might try creating a single view file and not using CI to set the 404. Manually set the 404 header at the very top of your single view file.
Code:
<?php header("HTTP/1.0 404 Not Found"); ?>
<html>
//...

You can install Live HTTP headers Firefox plugin to check the actual headers being sent and see if something is strange with them as well.

However, I tend to think it won't really help since you are having the same problem on other legit sites that aren't CI based, or even PHP based. Surely Bing is using .NET.

You also probably don't know if this affects all browsers with that plugin, all version of those specific browsers and all versions of that plugin for each browser/version. Then throw in the various OS combinations. It could just be one very specific combination of the above that is causing this error.
#6

[eluser]CroNiX[/eluser]
If your server is using FastCGI, CI might not be issuing the proper 404 header for that setup...

http://php.net/manual/en/function.header.php




Theme © iAndrew 2016 - Forum software by © MyBB