-
TL:DR; Details: We implemented server side live preview like written here: https://payloadcms.com/docs/beta/live-preview/server and done inside the new website template here: https://github.com/payloadcms/payload/tree/beta/templates/website However other then in the template we don't run payload in the same Next.js instance but on a separate one (The website is also Next.js, we need dedicated docker containers for security reasons). So the website is running on localhost:3011 and the cms on localhost:3010. The connection is done via GraphQL. I got everything working to preview the draft version of the page exactly once. After a change the post-message is sent, received and I tested that with https and with http, with secure cookies and without, same site lax and none always the same result. See the original issue regarding cookie problems here: vercel/next.js#49927 I'm unsure how the draft mode state is computed inside Next.js so i'm unsure where to further debug this. What I can see in dev tools is that the However this could also be related to caching or something else but I'm a bit stuck here. Is there someone who did this and it works like it should? I created a video showcasing this behaviour, perhaps this helps in giving me a hint: server_side_live_preview_payload.mp4 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Update: Seems to be a dev server problem. Works good with a production build. |
Beta Was this translation helpful? Give feedback.
Update: Seems to be a dev server problem. Works good with a production build.