ContentStack credentials not loading properly

Hi, I setup Contentful inside Plasmic with the pre-made “Contentful Fetcher”. While it looks good in the preview, when accessing the page in the production environment (using the loader component inside a Next.js app), then it is only fetching the data client-side and is showing “Please configure the ContentStack credentials” in the initial page.

You can also see that when looking into the generated SSR HTML. Is there anything I can do about that apart from writing my own custom data provider?

Screenshot 2023-06-13 at 15.52.30.png

Hi! Are you doing extractPlasmicQueryData() in your getStaticProps()?

Actually we are using the app directory, which is now stable since the last major release, so getStaticProps is not available. I found an old forum thread from 2021 that extractPlasmicQueryData can not be used on the server.
It seems that this is still true 2 years later, although the app router is the new standard in next.js 13?

But according to the example from the repo I shouldn’t need the prefetch: https://github.com/plasmicapp/plasmic/blob/master/examples/nextjs-example/app/app/[[...catchall]]/page.tsx

Unfortunately the pre-rendering pass via extractPlasmicQueryData(), where we extract all the data needed from the Plasmic component, doesn’t work for appdir yet

(but we’re working on it!)