Error 500 api_internal_error for preview on some content types

I am troubleshooting the preview feature for a development using the php kit.
So far I've been able to get the preview to work on one of my custom content type.
But for another one, I'm getting a 500 error from the api when querying the document using the ref token.

Following the troubleshooting guide for the preview, I've managed to reproduce the issue when testing with the Rest API Browser.
In the first case, using the ref token in the cookie is working.
On the second case, it doesn't (using a different token from the cookie).

Available to send more detail on the repo by MP.

Have you tried logging the reference in the console while running the preview?

Please note that we no longer officially support PHP, and we recommend using Next.js or Nuxt.js for optimal feature functionality.

The problem solved itself after a few days, the API stopped responding with a 500 for the preview on that document type. That was without any changes on the php calls from my side (using the SDK).

1 Like