Hello all,
I'm having some issues in our Next.js + Slice Machine project.
We set up the project as per the Prismic documentation and were able to bring data back from our Prismic repo with the included page
custom type, in /pages/[uid].js
.
We have since created our own article
custom type, in a folder /pages/article/[uid].js
, and followed the steps to query content outside the Slice Zone. However, when viewing my published article
locally at the correct path (like http://localhost:3000/article/test-article), the API response being passed to the component props is as follows:
{ error: null, slices: [] }
When viewing the test page
that does pull data from Prismic, the props are populated with the UID, data, document type, slices, and all of the things I would expect to come back.
This would suggest to me that Prismic is having trouble resolving the route for my published page. But if I navigate to a route that has no published page for it, with a UID that does not exist, the props yield a blank object { }
.
Has anyone experienced anything similar to this? Happy to share some code if it would help.
Thanks,
Courtney