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

Revalidation broken for Custom Post Types #82

Open
Renesauve opened this issue Apr 11, 2024 · 6 comments
Open

Revalidation broken for Custom Post Types #82

Renesauve opened this issue Apr 11, 2024 · 6 comments
Labels
bug Something isn't working need more info Issue needs more info

Comments

@Renesauve
Copy link
Collaborator

Works for "Pages" and "Posts" but when I update a custom post type like "Projects" for example it will do the first revalidate (sometimes) and then when I change it back it doesn't revert the change and no longer revalidates anymore

@Renesauve Renesauve added the bug Something isn't working label Apr 11, 2024
@CalebBarnes
Copy link
Owner

Can you add more info, where it was deployed (Vercel, Netlify, etc), and what version of Next.js?

@Renesauve Renesauve added the need more info Issue needs more info label Apr 11, 2024
@Renesauve
Copy link
Collaborator Author

Both sites I've tired this on were hosted on Vercel, I also tried adding to Netlify with Next.js Runtime v5 active and still didn't work (I didn't test this as thorough though so I may need to do it again)

Tested on Next v 14.1.4

I noticed there was a new version 14.2.0 today so I'll test that out

@CalebBarnes
Copy link
Owner

Any update on that?

@Renesauve
Copy link
Collaborator Author

Renesauve commented May 4, 2024

Oddly enough I can't even get it working for posts anymore even now that I'm trying it out a new site.

I've updated on-demand revalidation to latest version instead of 1.1.3.
I've also tried following their instructions (not using the nextwp revalidation hook)

I'm a bit stumped tbh.

I added this to the page.tsx:
export const fetchCache = "force-no-store";
This disabled the vercel caching: https://vercel.com/docs/infrastructure/data-cache/manage-data-cache

But definitely not ideal...

It honestly seems like it's the vercel caching that is causing the issue.

I'm gunna give Netlify another college try and see if I can make some magic happen

@Renesauve
Copy link
Collaborator Author

Renesauve commented May 6, 2024

Seems to be fixed in next version 14.3.0-canary.42 for posts specifically

Doesn't seem to be working for custom post types still

@CalebBarnes
Copy link
Owner

Just for posts or also pages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info Issue needs more info
Projects
None yet
Development

No branches or pull requests

2 participants