You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating a post or author, revalidation works as expected across the homepage and existing posts. However, when adding or removing/unpublishing a post entirely, sometimes only the homepage path gets revalidated. This means the "More stories" section on other exisiting posts doesn't get updated. The deleted/unpublished post also gets left behind and is still accessible.
Sometimes it does work, I can't seem to figure out why.
Video attached shows:
Newly deployed site using the deploy button in this repo (as at e43759b)
Site with 4 posts with a new 5th post being published, validation of home + all existing posts works (as seen in the function logs on the left)
When deleting that 5th post, only the homepage is invalidated, leaving the "More stories" section on all other posts out of date + the removed post still available
Adding another new post (Test Post 06), only the homepage gets revalidated, the new post is missing from "More Stories" on all other posts
Unpublishing an existing post (Test Post 04) only invalidates the homepage and itself, leaving it in the "More Stories" section on most other posts
Expected behaviour:
Adding a new post should add it to the "More stories" section of all other posts.
Note that this does reliably happen for me when updating a post, making a new post and then updating it immediately after is my current workaround
Removing/Unpublishing a post should:
remove it from the "More stories" section of all other posts
make it inaccessible from the website as a whole.
nextjs-sanity-revalidate_issue.mp4
The text was updated successfully, but these errors were encountered:
Related Commit 9c45983 (https://nextjs-blog-cms-sanity-v3-m2zs0oidy.sanity.build).
Originally posted by @kmelve in #89 (comment)
Summary
When updating a post or author, revalidation works as expected across the homepage and existing posts. However, when adding or removing/unpublishing a post entirely, sometimes only the homepage path gets revalidated. This means the "More stories" section on other exisiting posts doesn't get updated. The deleted/unpublished post also gets left behind and is still accessible.
Sometimes it does work, I can't seem to figure out why.
Video attached shows:
Expected behaviour:
nextjs-sanity-revalidate_issue.mp4
The text was updated successfully, but these errors were encountered: