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

Israel.9546.incorrect 404 redirect #9608

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Israellund
Copy link
Collaborator

Link to Issue

Closes: #9546

Description of Changes

  • User is now shown a message if they aren't signed in along with a Sign in button, and a different message if they are signed in but they go to a page that doesn't exist, with a Home button that redirects them to /dashboard/for-you

NOTE: I chose this method of redirection based off of the multiple ways we are using/showing the 404 page. @masvelio In regards to this comment you made on my previous PR, I chose to do it this way instead of possibly doing an automatic redirect if the url is incorrect, because I worried that if I did that it would cause a lot of downstream bugs because we show this page in many different places and use it in different ways.

"How We Fixed It"

-made a check to see if user was logged in and changed messages based on that, and added Sign in and Home buttons to correspond with the different messages.

Test Plan

  • with a signed in user go to a page that doesn't exist. Ex: http://localhost:8080/dashb
  • confirm that you now see the 404 page with a message that reads "This page doesn't exist. Please go to Home to view or join a conversation." with a Home button
  • Click the Home button and confirm that you are redirected to /dashboard/for-you
  • log out
  • go to page that doesn't exist
  • confirm that you now see a 404 page with the message "This page is private or doesn't exist. Please Sign in to view or join the conversation." with a Sign in button
  • click the Sign in button and go through the sign in process
  • after you're signed in confirm that you are still on the page that doesn't exist, but now you are shown the message about the page not existing and the Home button is shown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New 404 page redirects incorrectly
2 participants