cancel
Showing results for 
Search instead for 
Did you mean: 

status.redirect doesn't work under IE7

tahitianstud
Champ in-the-making
Champ in-the-making
Hello,

Been trying to implement a search engine through a webscript where if no search terms are entered or no results are returned then I use a different status.code, status.message and status.redirect commands to redirect to another Freemarker template (for ex: one for error 500, another for error 404 etc etc…)

Everything works well enough under Firefox but not Internet Explorer.

For example, under IE, when I detect that no search terms were entered I set the following:

status.code = 400;
status.message = "No search terms were entered";
status.redirect = true;

which is supposed to call and redirect to my "bulletinboardsearch.get.html.400.ftl" to display my custom error message.

Instead, and again only under Internet Explorer, the default browser 400 error page is shown (the one that is embedded in IE).

Does anyone else have this problem and hopefully, did anyone find a way to resolve this?


Thank you in advance !

My setup consists of:

Alfresco Enterprise 2.2 + RHEL 5
2 REPLIES 2

tahitianstud
Champ in-the-making
Champ in-the-making
Hello,

To answer my own post, here is the answer to my woes:

Internet Explorer (and only Internet Explorer, all versions) will not use your custom error pages if they are not over a set page size (1k I believe).   That means that if your error page only consists of one DIV inside the BODY with an error message in it, IE will not use your page but its built-in error page.

The solution then is to either:
- build a more elaborate error page (thus heavier)
- fill your existing page up with blanks like adding lines like that:

<span>          </span>

at the end of your page.

Hope this will help out somebody else one day.

maithili
Champ in-the-making
Champ in-the-making
To display custom error page uncheck the option Tools>Internet Options> Advanced> Browsing> Show friendly HTTP error messages