I’m having some issue with Nuxt not displaying new Prismic Fields after they are published.
I have added several RichTextFields to the website I am developing but they just come through as empty arrays no matter what I do. These fields are all within slices and have content inside Prismic.
I can see the content inside the API via the web explorer, but it renders an empty array in Nuxt3.
All other fields are working fine except for these new ones I have added.
Nuxt: 3.17.0 @nuxtjs/prismic": "^4.1.0"
Am using useAsyncData to get the data
Node 20.19.0
Thing I have tried:
Re-adding a different field (same issue)
Restarting my machine
Clear the nuxt cache
Opened the page in incognito
Any ideas as to why Nuxt is not displaying the data, is this a known issue? What is the work around?
I can see the content inside the API via the web explorer, but it renders an empty array in Nuxt3.
Since you see content in the API Explorer but Nuxt shows [], that doesn’t sound like a content modeling issue but more likely ref, path, or cache
Ref match: In the API Explorer, switch to Published (master) and note ref. Make sure your app isn’t using an older ref, clear preview and give the CDN ~1-2 min after publish.
Can always compare the ref in the API Explorer
Ensure the correct slice path, they live under:
slice.primary.my_field (non-repeatable zone)
slice.items[n].my_field (repeatable zone)
Render with <PrismicRichText :field="..."/>
That said, glad to hear the data appeared - it’s hard to pinpoint retroactively but checking the API Explorer first for ref/model/data is the quickest way to isolate where the issue is stemming from.