Skip to content

Removing static page in NextJS when that page is deleted on CMS #18967

Answered by SamiSousa
M1ck0 asked this question in Help
Discussion options

You must be logged in to vote

I just came across this myself. I originally assumed that using revalidate would cause getStaticProps to refetch data and regenerate a given page periodically, but I'm not seeing pages even update even though I'm setting revalidate on every page's getStaticProps. Some guidance would be appreciated

Edit:
My issue was that revalidate needed to be an integer, and was being entered as a string via the environment.
For static pages on wildcard pages like [slug].js, if fallback is set to true in getStaticPaths I found that a page that exists is deleted when the WordPress page is deleted.

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
8 replies
@brendanmckenzie
Comment options

@florianzemma
Comment options

@brendanmckenzie
Comment options

@florianzemma
Comment options

@omrirz
Comment options

Answer selected by M1ck0
Comment options

You must be logged in to vote
2 replies
@choutkamartin
Comment options

@omrirz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
8 participants