404 pages default to index page
404 pages default to index page
Hi,
I'm a bit puzzled by the behavior of s9y when it comes to 404 pages. It seems by default s9y has this line in the htaccess:
ErrorDocument 404 /index.php
The effect is that nonexisting pages get an error 404 code (correct), but they always show the start page. I wonder if there's any intent behind this. The obvious result is that a computer can see that it's an error, but a human can't. It doesn't seem to make any sense to me.
This seems true both for blogs I have based on s9y 1.x and 2.x and also for the s9y blog itself (blog.s9y.org).
If I comment this line I get the default 404 pages of my server, which seems more reasonable to me. Alternatively I think having an individual s9y error page that can be themed would also be reasonable.
I'm also wondering if commenting out that line has any side effects.
I'm a bit puzzled by the behavior of s9y when it comes to 404 pages. It seems by default s9y has this line in the htaccess:
ErrorDocument 404 /index.php
The effect is that nonexisting pages get an error 404 code (correct), but they always show the start page. I wonder if there's any intent behind this. The obvious result is that a computer can see that it's an error, but a human can't. It doesn't seem to make any sense to me.
This seems true both for blogs I have based on s9y 1.x and 2.x and also for the s9y blog itself (blog.s9y.org).
If I comment this line I get the default 404 pages of my server, which seems more reasonable to me. Alternatively I think having an individual s9y error page that can be themed would also be reasonable.
I'm also wondering if commenting out that line has any side effects.
Re: 404 pages default to index page
I' not sure about the intent. Garvin will know more, but he's backlogged on the forums due to being on vacation, so it might take him a few days to respond.hanno wrote:The effect is that nonexisting pages get an error 404 code (correct), but they always show the start page. I wonder if there's any intent behind this.
I could imagine this being a “leave it up to the user” kind of deal. Some people might have custom error pages in static HTML. I think the static pages plugin offers the possibility to use a static page created with it as a 404 page. Also, themes can set custom content using templating (view = '404', see clean-blog's index.tpl for an example).
YL
Re: 404 pages default to index page
Ok, this has been like this for years, so it can probably wait till Garvin comes back.
If the intent is to allow templated 404 pages it should probably still default to some kind of error message.
If the intent is to allow templated 404 pages it should probably still default to some kind of error message.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: 404 pages default to index page
Yeah, one intent is customized 404 pages, which is the suggested way to deal with if you want real error pages within s9y.
I for myself much prefer the "default content" of a page rather than an empty 404 page which ends my journey. This way, I can continue reading the blog and maybe find the content I was looking for somehow. I don't see benefit on showing a default server 404 page.
Regards,
Garvin
I for myself much prefer the "default content" of a page rather than an empty 404 page which ends my journey. This way, I can continue reading the blog and maybe find the content I was looking for somehow. I don't see benefit on showing a default server 404 page.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: 404 pages default to index page
Could we emit a standard error message through $CONTENT on 404 pages, though? Without too much effort and maybe without breaking the view='404' and other 404 mechanisms? Because the way it is now, if the theme does not provide a 404 view, the “normal” user might not really notice that he's getting a 404 …garvinhicking wrote:I for myself much prefer the "default content" of a page rather than an empty 404 page which ends my journey.
YL
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: 404 pages default to index page
Hey,
that's actually a good idea, yes! I just committed a patch to use the content_message for that. However it might possibly break things, I'll notify onli of my change so we can use it as a starting point.
It would need a new language variable "URL_NOT_FOUND", I would propose this content:
Regards,
Garvin
that's actually a good idea, yes! I just committed a patch to use the content_message for that. However it might possibly break things, I'll notify onli of my change so we can use it as a starting point.
It would need a new language variable "URL_NOT_FOUND", I would propose this content:
Code: Select all
The URL you have requested could not be found. You will see the default start page continue reading.
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: 404 pages default to index page
I don't really understand the second sentence. If someone is reading this text, do they get a link to the default start page? Are they being redirected automagically? (Wouldn't advise that.)garvinhicking wrote:Code: Select all
The URL you have requested could not be found. You will see the default start page continue reading.
I think “Something went wrong. The requested URL could not be found.” works just fine and should be easy to translate. Also, it does not put the blame on the user (“you”). I'd suggest not adding any links or hints to navigations or search forms since we'll never know if users have those disabled or if their theme even supports them.
I mean, this is just supposed to be a simple 404 text, if people want more, they can still use a theme with a custom 404 view or a 404 static page …?
YL
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: 404 pages default to index page
Hi!
The blog shows the default start page plus this message on top of it. There's a "to continue reading" misspelling, missing the "to".
"Something went wrong" is too generic for me, then I'd leave it at "The requested URL could not be found. You can continue reading the content of the default start page"?
Regards,
Garvin
The blog shows the default start page plus this message on top of it. There's a "to continue reading" misspelling, missing the "to".
"Something went wrong" is too generic for me, then I'd leave it at "The requested URL could not be found. You can continue reading the content of the default start page"?
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: 404 pages default to index page
Ah, so we're technically not using {$CONTENT} but {$content_message} in content.tpl?garvinhicking wrote:"Something went wrong" is too generic for me, then I'd leave it at "The requested URL could not be found. You can continue reading the content of the default start page"?
In that case, I'd just go with “The requested URL could not be found (404). This is the default start page.” That way, we're providing a little information (404) for “tech-savvy” users and still use a text message that is (I think) still easy to translate.
Can we have an “if-able variable” for this that works in content.tpl? Something similar to “{if $searchresult_tooShort}” etc. so the message can be customized in themes? (This is obviously semi-important at best, it will work out fine if not and we're probably overthinking 404 pages already.)
YL
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: 404 pages default to index page
Hi!
OK, I could use that wording, no problem. A theme can simply check on the view=404 parameter to customize output...
Regards,
Garvin
OK, I could use that wording, no problem. A theme can simply check on the view=404 parameter to customize output...
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: 404 pages default to index page
Ah, even better. Wasn't aware if $view was available in content.tpl.garvinhicking wrote:A theme can simply check on the view=404 parameter to customize output...
YL
Re: 404 pages default to index page
Ahem, I use another solution. The plugin staticpage has a checkbox "Diese Seite als 404-Fehler-Seite definieren". Works for me. See http://u1amo01.de/blog/wrong_url
Re: 404 pages default to index page
Ahem, we're aware of that option.u1amo01 wrote:Ahem, I use another solution.
That should still work.yellowled wrote:I mean, this is just supposed to be a simple 404 text, if people want more, they can still use a theme with a custom 404 view or a 404 static page …?
YL
Re: 404 pages default to index page
Uhh, looks like I should read more carefully. Sorry.
Re: 404 pages default to index page
I like that, but would propose to phrase it "The requested page could not be found (404). ...". Don't frighten not-so-tech-savvy people with strange acronyms.yellowled wrote:In that case, I'd just go with “The requested URL could not be found (404). This is the default start page.” That way, we're providing a little information (404) for “tech-savvy” users and still use a text message that is (I think) still easy to translate.
(Would have submitted a patch, but didn't find the text (yet).)