Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 Not Found - Browser Gets Forwarded to /404.xhtml #2367

Closed
mheppler opened this issue Jul 16, 2015 · 10 comments
Closed

404 Not Found - Browser Gets Forwarded to /404.xhtml #2367

mheppler opened this issue Jul 16, 2015 · 10 comments
Assignees
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" UX & UI: Design This issue needs input on the design of the UI and from the product owner
Milestone

Comments

@mheppler
Copy link
Contributor

mheppler commented Jul 16, 2015

When looking at how our site handles URLs that are not found -- AKA, 404 Not Found Error -- I noticed that the bad URL is not retained in the browser window, instead it gets forwarded to the URL /404.xhtml. Other sites don't forward you, so that you can see what the bad URL is -- maybe it was a typo, and you can easily fix it.

screen shot 2015-07-16 at 4 58 26 pm

Related(?) to #1057.

@eaquigley
Copy link
Contributor

👍

@mheppler
Copy link
Contributor Author

Turned to StackOverflow in a quest for answers.

PrettyFaces 404 page without URL redirect

@pdurbin
Copy link
Member

pdurbin commented Jul 23, 2015

The answer by @lincolnthree who created PrettyFaces is obviously worth checking out!

@bencomp
Copy link
Contributor

bencomp commented Sep 18, 2015

This is not just about seeing the wrong URL - it breaks semantics of the web, because instead of giving an error response to the browser, this is just showing the error text. The browser is told to find the answer to a bogus request at /404.xhtml and because that is there, the browser 'thinks' the request was handled correctly (200 OK). If a browser were to cache content, it might cache the error page as a valid response.

This goes for 403 responses too. Please put this issue on the roadmap.

@lincolnthree
Copy link

Yes, regarding the HTTP status code, you should still send '404 NOT FOUND' when forwarding to the error page.

@mercecrosas mercecrosas modified the milestone: In Review Nov 30, 2015
@mheppler mheppler added UX & UI: Design This issue needs input on the design of the UI and from the product owner Component: Code Infrastructure formerly "Feature: Code Infrastructure" labels Jan 28, 2016
@scolapasta scolapasta removed this from the Not Assigned to a Release milestone Jan 28, 2016
@mheppler
Copy link
Contributor Author

This is also happening for the 403 pg, as found in #2838.

@scolapasta
Copy link
Contributor

This has been fixed in the widgets branch.

@pdurbin
Copy link
Member

pdurbin commented Apr 29, 2016

@sekmiller showed me how this works with "/loginpage.xhtml" for example and how the Shib code should be modified after edf12fb and related commits are merged into "develop". I asked him not to touch the Shib code in the widgets branch since it will only lead to a merge conflict on pull request #3025. The bottom line for @kcondon is that this might need to be retested as we integrate multiple branches into "develop".

@pdurbin
Copy link
Member

pdurbin commented May 12, 2016

@scolapasta if https://github.com/IQSS/dataverse/tree/2469-widgets gets merged before https://github.com/IQSS/dataverse/tree/2939-shib (pull request #3025) shouldn't a new issue get opened to have the Shib code use the new sendError method that will only be available once the 2469-widgets branch is merged? I'm asking because at #3025 (comment) @eaquigley wrote "Good on my end. Passing to @kcondon to merge."

@kcondon
Copy link
Contributor

kcondon commented May 27, 2016

Works, closing, error is presented but URL is preserved and correct http code is returned.

@kcondon kcondon closed this as completed May 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" UX & UI: Design This issue needs input on the design of the UI and from the product owner
Projects
None yet
Development

No branches or pull requests

8 participants