Bumping this as I am a MODx newbie and have got this same error... Was there some sort of solution found? What I get is exactly the same as the OP - the error page when it is needed seems to start with the Long Title (H2), missing out everything above.
The error page itself is fine, and previews perfectly in the manager.
Been scratching my head on this too something cuts off the header information preventing the 404 page displaying. Not found an answer yet
Did anyone solve this? I have the same issue... seems something odd is going on here!
-
☆ A M B ☆
- 24,524 Posts
The thing is, MODx should be overriding this; the server gets a request for somepage.html. It rewrites this to index.php?q=somepage.html. So the index.php calls the parser, which sees the "somepage.html" part, and the q= tells it this is an alias. So it goes to the database to look for the document ID of the resource with this alias. If it doesn’t find anything, it does a redirect to the Configuration-specified error page. The redirect code sets a header of "HTTP/1.0 404 Not Found", and loads up the designated error resource (or site_start if no designation is found), pulls it out of the cache or parses it as required and fires it off after the 404 headers. It also deals with the problem of the error page not being found, keeping track of the loops through the resource ID not being found, and eventually generates the infamous "ERROR: Too many forward attempts!</h1><p>The request could not be completed due to too many unsuccessful forward attempts." with a HTTP/1.0 500 Internal Server Error header.
Much the same thing happens with the unauthorized page, but it uses a "HTTP/1.1 401 Unauthorized" header.
I don’t know all that much about web server configuration, but it looks like somebody’s server is configured in such a way that it chokes on the "HTTP/1.0 404 Not Found" header. I suspect those forum posts about the failure of "secured" resources has a similar cause. And it’s something recent; either 1.0.2 made some small but significant change in the headers and forwarder functions, or a recent upgrade to Apache (or bind?) or IIS is buggy or misconfigured. I’m suspecting the latter, since we’ve gotten too many "My site was working fine, then all of a sudden today it does this..." posts.
Thanks Susan,
So it’s likely a server thing is it? What do I need to ask them to sort out to enable this to work for me?
Cheers,
dubbs
-
☆ A M B ☆
- 24,524 Posts
Ask them why a PHP-generated header of "HTTP/1.0 404 Not Found" would cause problems.
Thanks it seems this *poor* hosting does not allow it - they suggest using mod_rewrite instead? how would this be possible?
Just an update on this one. I’ve since moved host from Fasthosts but found a workaround while googling that while a fudge works. By adding 7800 characters to the head of the 404 document before any html I was able to display the 404 page.