Prismic content previews not working with Next.js + Vercel + Multi-language website example

I'm attempting to get Prismic content previews working with Next.js deployed to Vercel, and I'm unable to get it to work even with a Prismic starter project template and a bare-minimum repo/deployment.

I'm not even sure where to begin troubleshooting this, so I'm asking for help. Thank you!

I created a new example project using:

npx prismic-cli theme --theme-url https://github.com/prismicio/nextjs-multi-language-site --conf prismic-configuration.js

The Github repository is here:

Nothing was changed in this repo from the original example code generated by the prismic-cli command listed above.

The site has been deployed to Vercel and can be seen here:

https://next-prismic-preview-test.vercel.app

Prismic Setup

After deploying to Vercel, I went into the Prismic settings for the repo and created a new preview with the following settings:

Site Name
Production

Domain for Your Application
https://next-prismic-preview-test.vercel.app

Link Resolver
/api/preview

I then went into the Homepage document in Prismic, changed a bit of text, clicked "Save" and clicked the "Preview" Icon.

Expected Result

I end up with on a preview URL that shows my unpublished change.

Actual Result:

I briefly see a page with the unpublished change, but a moment later a few redirects happen and I end up back at https://next-prismic-preview-test.vercel.app looking at the original, published content.

Hi Chris,

Welcome to the community!

I'm going to investigate this for you and try and recreate this issue on my side.

Thanks.

1 Like

Thank you, @Phil! Look forward to hearing what you find out.

Hi Chris,

I tested this on my side on vercel but didn't get any issues.

Can you checkout out our troubleshooting guide and see if anything applies?

Thanks.

This thread has been closed due to inactivity. Flag to reopen.