ljonel
CCConvex Community
•Created by ljonel on 10/12/2024 in #support-community
Nextjs server actions does not work with revalidatePath
I've seen that a lot of people have had this problem so maybe this will be useful to someone if they need it
12 replies
CCConvex Community
•Created by ljonel on 10/12/2024 in #support-community
Nextjs server actions does not work with revalidatePath
so, with the help of chatgpt, I ended up converting the middleware to something like this
12 replies
CCConvex Community
•Created by ljonel on 10/12/2024 in #support-community
Nextjs server actions does not work with revalidatePath
I am very grateful that you wanted to help.
Well after a one day research adventure I am done with it.
https://github.com/vercel/next.js/issues/50659
The problem is in the middleware. This was my middleware.
Unfortunately, here revalidatePath and server actions do not want to work. So I changed the config to
Revalidatepath started working, server actions too, but login and logout stopped working.
12 replies
CCConvex Community
•Created by ljonel on 10/12/2024 in #support-community
Nextjs server actions does not work with revalidatePath
When I want to keep everything like above getting/creating workspace on server side the data does not refresh. After manually refreshing the page it does, but that's not the point.
I'm only giving the example you have in the documentation because I wanted to test it, and I thought it will work on a server with revalidate.
12 replies