You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yarn dev then access any preview link. e.g. /api/preview?token=:token1&documentId=:id
What is expected?
redirectToPreviewURL shouldn't error. Afaik latest prismic-next version works fine with Next.js 13
What is actually happening?
Editing the document on Prismic and then clicking the "View" redirects just fine to my local preview route, but redirectToPreviewURL errors with 500 and unable to view anything.
The text was updated successfully, but these errors were encountered:
This issue has been labeled as a bug since it was created using the 🚨 Bug Report Template.
Hi there, thank you so much for the report!
Following our Maintenance Process, we will review your bug report and get back to you next Wednesday. To ensure a smooth review of your issue and avoid unnecessary delays, please make sure your issue includes the following:
Information about your environment and packages you use (Node.js version, package names and their versions, etc.) Feel free to attach a copy of your package.json file.
Any troubleshooting steps you already went through
A minimal reproduction of the issue, and/or instructions on how to reproduce it
If you have identified the cause of the bug described in your report and know how to fix it, you're more than welcome to open a pull request address it. Check out our quick start guide for a simple contribution process.
If you think your issue is a question (not a bug) and would like quicker support, please close this issue and forward it to an appropriate section on our community forum: https://community.prismic.io
Getting
TypeError: Invalid URL
onredirectToPreviewURL
on the Next.js preview api route.Versions
@prismicio/next
: ^1.5.0next
: 13.1.6Reproduction
Just following the simplest Next.js documentation to enable previews:
On
api/preview.ts
:Steps to reproduce
yarn dev
then access any preview link. e.g./api/preview?token=:token1&documentId=:id
What is expected?
redirectToPreviewURL
shouldn't error. Afaik latestprismic-next
version works fine with Next.js 13What is actually happening?
Editing the document on Prismic and then clicking the "View" redirects just fine to my local preview route, but
redirectToPreviewURL
errors with 500 and unable to view anything.The text was updated successfully, but these errors were encountered: