Hi,
I have added a next.js preview plugin to my nav, nav columns and footer models in my sandbox environment, When I tried testing the preview with my view app and local host, the preview doesnât seem to properly work since the saved but unpublished changes I made to the content were not updated in the preview. (To my understanding, the whole purpose of the preview is to view how the saved changes looks in the frontend without publishing it)
Can you please let me know how to check this preview with my local host or view app?
Hi @ekswathi123,
Welcome to the Dato forum!
It is hard to troubleshoot this without seeing your specific project and code⌠but most likely you forgot to set either a preview API token and/or the âsecret preview tokenâ. There are some basic instructions at https://www.datocms.com/marketplace/plugins/i/datocms-plugin-web-previews, but you canât figure it out, could you please email us with your project details (and share your project code/repo) at support@datocms.com? Then we can take a detailed look at your setup and try to figure out what params are missing
Thank you!
Sorry, Unfortunately I canât share you my project details with you since this is not my personal project and is related to my company. However is there any way to enable the preview for pages router.
Hey @ekswathi123,
Yes, you should still be able to use the web preview with the pages router. You need to set up an API route for that: https://www.datocms.com/docs/legacy-next-js-documentation/setting-up-next-js-preview-mode
I have tried these but this doesnât seem to work, just a clarification I had encountered an issue of the preview threshold limit has been reached and the maximum limit for preview size is 2 kb, but my preview data size is around 200 kb, can you please let me know if there is any fix to overcome this or any other method to set this preview for my nav & footer elements alone.
Hey @ekswathi123,
Sorry, this is news to me⌠where are you seeing that error? Can you please provide the exact error message and/or a screenshot of it?
It is hard to troubleshoot this when we canât see your code, because I canât tell whether the error is coming from a specific API route, another part of Next.js, one of your records/models in particular, or one of our API endpoints.
If you canât share the whole project with us, could you please make a minimum reproducible example that just replicates the particular error youâre seeing (copying and pasting whatever code doesnât work from your real project), and share that instead?
I understand this is for your company, but given that youâre asking us for official support and we already host this data anyway, perhaps they could consider this limited request? It would really help us be able to help you