Hello everyone!
I'm having a small problem or maybe I'm doing something wrong with a slice component
When my slice is rendered locally I get the "item" relationship correctly populated but in the builder (xx.prismic.io) I get a broken_type
I was expecting to be able to retrieve the relationships and potentially use them in the slice to properly manage the component preview.
I've already tried to :
- archive / publish relationship documents
- link another document type
- recreate a slice with relationships and I get the same error.
I'm still learning Prismic, so I might make a mistake.
Errors
Returning data when fetching XX.prismic.io :
[
{
item: {
key: 'c0f4e883-2a1b-4c9c-9600-9000b517e179',
id: 'Z6OnJBEAACsACyOO',
tags: [],
type: 'broken_type',
isBroken: true
}
]
VS :
Returning data when fetching locally :
[
{
item: {
id: 'Z6OnJBEAACsACyOO',
type: 'products',
tags: [],
lang: 'fr-fr',
slug: 'brighton-insulated-snow-jacket',
first_publication_date: '2025-02-05T18:00:11+0000',
last_publication_date: '2025-02-12T10:52:51+0000',
uid: 'brighton-insulated-snow-jacket',
url: '/products/brighton-insulated-snow-jacket',
link_type: 'Document',
key: 'cd31dead-9c3c-4574-944a-73d642dcb55a',
isBroken: false
}
]
Hosting provider
- Local / Production Repository on Prismic (with only one master ref)
Package.json file
"@prismicio/client": "^7.15.1",
"@prismicio/next": "^1.7.1",
"@prismicio/react": "^2.9.1",
--
"@slicemachine/adapter-next": "^0.3.66",
"slice-machine-ui": "^2.12.3",
Steps to reproduce
- Create a slice with relationship
- Add document in the relation slot
- Console log slice.primary.[relation key]