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

Change fallback false to blocking to avoid 404 error when trying to revalidate a new article #213

Merged
merged 1 commit into from
Feb 19, 2023

Conversation

choutkamartin
Copy link
Contributor

@choutkamartin choutkamartin commented Feb 14, 2023

Based on:
#212

Fallback set to false messes up with the incremental static generation when a new article is created. That is due to Next.js trying to revalidate a page that is not generated, which returns 404 and aborts the revalidation process.

Fallback false only generates pages during build time. Fallback blocking generates pages at build time, and when it exists in the CMS, but has not been yet generated, during a first request to that page, the page gets generated.

@vercel
Copy link

vercel bot commented Feb 14, 2023

@choutkamartin is attempting to deploy a commit to the Sanity Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@stipsan stipsan left a comment

Choose a reason for hiding this comment

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

Great find, thank you! ✨

@vercel
Copy link

vercel bot commented Feb 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
nextjs-blog-cms-sanity-v3 ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Feb 19, 2023 at 11:49PM (UTC)

@stipsan stipsan added this pull request to the merge queue Feb 19, 2023
Merged via the queue into sanity-io:main with commit febd62b Feb 19, 2023
@kmelve
Copy link
Member

kmelve commented Feb 19, 2023

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants