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

enhance(cloud-function): return 404.json if index.json not found #11442

Closed

Conversation

caugner
Copy link
Contributor

@caugner caugner commented Jul 9, 2024

Summary

(MP-1356)

Problem

We usually show a nice 404 page (e.g. https://developer.allizom.org/en-US/404), but this does not apply for Blog (https://developer.allizom.org/en-US/blog/404/) and Curriculum (https://developer.allizom.org/en-US/curriculum/404/). The correct 404 page shows up shortly, and is then replaced by an empty page with only header and footer.

Solution

Return 404.json for missing index.json requests.


Screenshots

Before

After


How did you test this change?

Will deploy to stage on July 10.

@caugner caugner requested a review from LeoMcA July 9, 2024 20:06
Comment on lines +13 to +16
const NOT_FOUND_JSON = "en-us/_spas/404.json";
const NOT_FOUND_HTML = "en-us/_spas/404.html";

let notFoundBuffer: ArrayBuffer;
const bufferCache = new Map<string, ArrayBuffer>();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prepares for having per-locale 404 pages, as currently the 404 page only has en-US links in the top navigation.

Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, let's test on stage

@github-actions github-actions bot added the idle label Aug 9, 2024
@github-actions github-actions bot removed the idle label Aug 16, 2024
@github-actions github-actions bot added the idle label Oct 10, 2024
Copy link
Contributor

github-actions bot commented Dec 5, 2024

This pull request has merge conflicts that must be resolved before it can be merged.

@github-actions github-actions bot added the merge conflicts 🚧 Please rebase onto or merge the latest main. label Dec 5, 2024
@caugner
Copy link
Contributor Author

caugner commented Dec 5, 2024

Superseded by #12248.

@caugner caugner closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud-function idle merge conflicts 🚧 Please rebase onto or merge the latest main.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants