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

Revalidate whole path for 404 and 307 paths, new pages and changed redirects #252

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Conversation

pookmish
Copy link
Contributor

@pookmish pookmish commented Dec 16, 2024

READY FOR REVIEW

Summary

  • This should help with 404 pages and 307 pages.
  • When a path produces a 404 or 307 response, it gets heavily cached. Cache tags have no impact to trigger that path to regenerate. This change will fetch the path in question and clear out the path if it's a 404 or 307 response, allowing the page to re rebuilt.

Setup tasks and/or behavior to test

  1. Check out this branch
  2. Set environment variable in your .env.local NEXT_PUBLIC_DOMAIN=http://localhost:3000
  3. run rm -rf .next; yarn preview and allow it to build
  4. go to a page that will be a 404, like http://localhost:3000/foo/bar
  5. verify the 404 is returned
  6. in the drupal side on your local, create a node and manually configure the path alias to be /foo/bar & Save
  7. reload your localhost page.
  8. verify it loads the created page
  9. delete the page in Drupal
  10. reload localhost to verify it's 404 again
  11. create a redirect from /foo/bar to some other page
  12. reload localhost to verify it redirects
  13. change the redirect in drupal to another page
  14. load localhost:3000/foo/bar again
  15. verify it redirect to the new location.

Copy link

vercel bot commented Dec 16, 2024

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

Name Status Preview Updated (UTC)
su-library ✅ Ready (Inspect) Visit Preview Dec 16, 2024 7:08pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant