CalebBarnes / nextwp

http://nextwp.org/
8 stars 0 forks source link

Revalidation broken for Custom Post Types #82

Open Renesauve opened 5 months ago

Renesauve commented 5 months ago

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

CalebBarnes commented 5 months ago

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

Renesauve commented 5 months ago

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 commented 5 months ago

Any update on that?

Renesauve commented 5 months ago

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 commented 5 months ago

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 commented 5 months ago

Just for posts or also pages?