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

Update 404 Handler to not get stuck #201

Closed
ccorda opened this issue Feb 8, 2022 · 2 comments · Fixed by #213
Closed

Update 404 Handler to not get stuck #201

ccorda opened this issue Feb 8, 2022 · 2 comments · Fixed by #213

Comments

@ccorda
Copy link
Contributor

ccorda commented Feb 8, 2022

Looks like something in v12 changed, and now our current redirect will get stuck if it first 404s, then has a redirect added next:
https://github.com/patronage/bubs-next/blob/main/website/src/pages/%5B%5B...slug%5D%5D.js#L96-L100

The solve looks to be to return more than notFound: true:

return {
  notFound: true,
  revalidate: 60,
  props: {},
};
@ccorda ccorda added Epic and removed Epic labels Feb 8, 2022
@ccorda
Copy link
Contributor Author

ccorda commented Feb 8, 2022

Original Issue: vercel/next.js#34006

@ccorda
Copy link
Contributor Author

ccorda commented Jun 1, 2022

I've also found an inverse case to be true -- if you have a published page, then convert it's status to draft or trash, it will still show, even after the 60 second revalidate window.

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 a pull request may close this issue.

1 participant