Bug 200031 - Custom 404 error page for a product's Help
Summary: Custom 404 error page for a product's Help
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M2   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
: 107893 140738 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-08-15 09:57 EDT by Seth Packham CLA
Modified: 2007-09-21 15:17 EDT (History)
5 users (show)

See Also:


Attachments
Image showing error page (58.84 KB, image/x-png)
2007-08-22 20:27 EDT, Chris Goldthorpe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Seth Packham CLA 2007-08-15 09:57:18 EDT
Bug 68518 will set the Help system to return a 404 Error when a page is not found. The Help system should display its standard message, somethng like "the page you were looking for was not found. The feature may not have been installed." I don't remember the exact wording.

Request:
A product configuration should be able to define a custom 404 Error page that loads when a 404 is returned. I think this should be an entry in the plugin_customization.ini file. If no custom 404 page is declared, then Eclipse should use its default page.
Comment 1 David Sky CLA 2007-08-15 10:23:06 EDT
( repeated from bug 68518 )

How will this work in languages other than English?

If there is a translated custom 404 page, that page should of course be
displayed.

If the custom 404 page is NOT translated into the user's language, however,
there are two choices:

1.) Display the English version of the custom 404 page (if one exists).
2.) Display the translated version of the existing 'The topic that you have
requested is not available...' string as is currently done, even if there is an
English version of the custom 404 page available.

My vote would be for option 2.

- - - - ( end quote from 68518 )

Evan Hempel voted for option 1 and said in part "the 404 translation should follow the same method that is used for any help topic lookup using nl fragments".

I agree that it would be consistent to show the English custom 404 page if there isn't a translated one, but in this case I think it is worth the extra work for an exception - the customer is already in an error-state, so we should do our best to provide information we know they can read (ie in their language), rather than add insult to injury and provide an error message in a different language (English).
Comment 2 Evan Hempel CLA 2007-08-15 11:00:56 EDT
(In reply to comment #1)
> Evan Hempel voted for option 1 and said in part "the 404 translation should
> follow the same method that is used for any help topic lookup using nl
> fragments".
> 
> I agree that it would be consistent to show the English custom 404 page if
> there isn't a translated one, but in this case I think it is worth the extra
> work for an exception - the customer is already in an error-state, so we should
> do our best to provide information we know they can read (ie in their
> language), rather than add insult to injury and provide an error message in a
> different language (English).
> 

I'm ok with that reasoning.
Comment 3 Chris Goldthorpe CLA 2007-08-22 14:14:00 EDT
I agree that when looking for the custom 404 page we should take the path specified and look in the nl/locale directory first, just as we do for other help pages. If the local page is not found look in the root, if that is not found use the default message (the same as is whown in Eclipse 3.3). 

If you want to fall back to show the default message when the localized version of the custom page is not found you should create the custom 404 page only in the nl directories and not in the root.

org.eclipse.help.base/preferences.ini currently contains a preference to specify the initial content page,

help_home=/org.eclipse.help.base/doc/help_home.html

I will add another option, "help_error_page" which works in the same way for the custom 404 page.
Comment 4 Chris Goldthorpe CLA 2007-08-22 20:27:04 EDT
Created attachment 76729 [details]
Image showing error page

I have this mostly implemented and I'm in the process of fine tuning the error page, see screenshot. I am thinking that I will not show the breadcrumbs on the error page but will leave the banner in (it is the same banner used by the home page).

Here is how things will work:

A new preference "page_not_found" will be added to org.eclipse.help.base. This is the custom error page. Eclipse will have a default page which can be overridden.

When opening the page it will look for a local version first, just as for any other page, then look for a page in the root directory.

If the page cannot be opened or the preference is nonexistent or an empty string we will let the browser handle the 404 error.

I believe that this will satisfy the requirements listed in the previous comments. If you have any opinion on how this page should look or what text it should contain let me know.
Comment 5 Chris Goldthorpe CLA 2007-08-23 13:59:44 EDT
Fixed in HEAD.
Comment 6 Chris Goldthorpe CLA 2007-09-21 15:09:59 EDT
*** Bug 140738 has been marked as a duplicate of this bug. ***
Comment 7 Chris Goldthorpe CLA 2007-09-21 15:17:30 EDT
*** Bug 107893 has been marked as a duplicate of this bug. ***