-
Notifications
You must be signed in to change notification settings - Fork 526
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
PR preview pages don't handle visit to non deployed pages well #12786
Comments
The root cause for the missing 404 page is that it was moved from I have now updated the CloudFront config to serve the correct error page. |
I think this is still in progress. Convesation from the last meeting:
|
I thought this issue is only about the bad not found page. If you think we should solve the whole 404 UX in this PR, that's fine to me. I'm not sure what the preferences are from the notes though. It seems people are neither happy with showing a 404 (current behavior) nor with directly redirecting to prod (previous behavior, iirc). Maybe a custom 404? But anyway this seems entirely out of control for the content repo and should go to engineering instead. |
Move this issue to the rari repo? |
@caugner moved it to rari as it seemed like a proper place |
@pepelsbey Both the 404 page and the Cloud Function serving the 404 page are in yari. |
Summary
Previews generated by the PR review companion include only the modified files. On preview pages, links to other unmodified pages give a 404 error. Also, the error is wrong:
Key: pr37670/en-us/_spas/404.html
. Following is the content of the 404 response:Reviewers find it annoying to see the 404 page instead of the requested page, even though it's not modified in the PR. It would be better if, on the 404 page, there is a link to the page on the production site.
Steps to reproduce
mdn/content
repo.pr37670/en-us/_spas/404.html
not found error.Solution
The solution is based on the TamporMonkey script created by Will. The script adds a link to the same doc on the production site. Instead of TamporMonkey, we can do it in the deployer code itself.\
During dev deployments for PRs, populate the
/en-us/_spas/404.html
file with the following content:Note: Ignore the fact that PR build doesn't populate the original
_spas/404.html
. The production style 404 page is not useful in PR previews anyway.The text was updated successfully, but these errors were encountered: