I’m currently building a preview mode for our editors. The preview has been setup in accordance with the NextJS Preview mode docs and DatoCMS docs. Everything works completely fine locally, however, when a deploy to Netlify is made It creates a client side exception error (500) - once cookies are set.
The previous issue is very old and the version of the plugin being used then is now unsupported. So we can keep that aside for now.
Do you have any deploys in which you used the latest version of the plugin? We can escalate this to the engineers, but if they see an older version of the plugin, they’d first flag that.
Sorry for the delay in response! Our developers just gave you some feedback in the GitHub issue yesterday, and will likely respond there going forward.
Please give that advice a try and let us know how it goes!
No, because we haven’t yet seen the results of your experiments.
Please link us to deploy logs where you try the latest version of the plugin, and we’ll be happy to look further. Suggest linking them here rather than just in the github issue since our Support team is not “Tracking” the github issue but we are tracking this thread
I have found if we skip function cache we can get the site to build, however, I still seem to 500 if I set any cookie preview logic from the nextjs guides: Advanced Features: Preview Mode | Next.js
Implementing the basic logic to set preview cookies on /api/preview