# Content Relationships and Slice Machine

**URL:** <https://community.prismic.io/t/content-relationships-and-slice-machine/9792>\
**Category:** Developing with Prismic\
**Tags:** slice-machine\
**Created:** [April 17, 2022, 6:47am UTC](https://community.prismic.io/t/content-relationships-and-slice-machine/9792 "2022-04-17T06:47:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![studio120barbering](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@studio120barbering](https://community.prismic.io/u/studio120barbering)\
**Post date:** [April 17, 2022, 6:47am UTC](https://community.prismic.io/t/content-relationships-and-slice-machine/9792/1 "2022-04-17T06:47:20Z")

</div>

Hi I managed to get my slices to work with content relationships but slice simulator isn't receiving this data so I can't preview data or get screenshots.

I have a testimonials slice that pulls in data from a testimonials custom type.

I am using Prismic with NextJS.

My homepage is coded like this.

```auto
import { createClient } from '../prismicio';
import { SliceZone } from '@prismicio/react';
import { components } from '../slices/index';

import Layout from '../components/Layout';

export default function Home({ layout, home }) {
	return (
		<Layout layout={layout}>
			<SliceZone
				slices={home.data.slices}
				components={components}
			/>
		</Layout>
	);
}

export async function getStaticProps({ params, previewData }) {
	const client = createClient({ previewData });

	const layout = await client.getSingle('layout');
	const home = await client.getSingle('homepage', {
		fetchLinks: 'testimonials.testimonial',
	});

	return {
		props: {
			layout,
			home,
		},
	};
}

```

I am pulling in data in my slice with

```auto
slice.primary.testimonialRelationships.data.testimonial

```

I works fine when I view page as a whole at localhost:3000 but when in slice simulator (even for other slices now) I'm getting this error.

**TypeError: Cannot read properties of undefined (reading 'testimonial')**

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [April 19, 2022, 11:06am UTC](https://community.prismic.io/t/content-relationships-and-slice-machine/9792/2 "2022-04-19T11:06:16Z")

</div>

Hi Roy,

Mock data for content relationships is not possible in Slice Machine at the moment, the team are planning to work on this very soon. This is being tracked as a feature request here:

> [@Mock data for Content Relationship](https://community.prismic.io/t/mock-data-for-content-relationship/6505/3):
>
> Hello @kris, yes, at the moment, the mock data configuration for Content Relationship fields is not yet implemented. That means it will add an automatic web URL value, such as: "example\_content\_relationship": { "link\_type": "Web", "url": "http://twitter.com" },

For now you will only be able to test this with Published content in your Prismic repository.

Thanks.

---

<div class="post-metadata">

**Author:** ![mateusz.winek](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@mateusz.winek](https://community.prismic.io/u/mateusz.winek)\
**Post date:** [August 9, 2022, 9:15pm UTC](https://community.prismic.io/t/content-relationships-and-slice-machine/9792/3 "2022-08-09T21:15:54Z")

</div>

Hi Phil,

what is the current status of this feature?  
it's crucial feature for me as I can't do screenshot and test my slices via slicemachine.

Best  
Mateusz

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [August 10, 2022, 1:50pm UTC](https://community.prismic.io/t/content-relationships-and-slice-machine/9792/4 "2022-08-10T13:50:01Z")

</div>

There has been no change in the release status of this feature. For now it's only possible to test with live content and add Custom screenshots.

---

<div class="post-metadata">

**Author:** ![prismic29](https://avatars.discourse-cdn.com/v4/letter/p/b3f665/32.png) [@prismic29](https://community.prismic.io/u/prismic29)\
**Post date:** [September 16, 2024, 9:23pm UTC](https://community.prismic.io/t/content-relationships-and-slice-machine/9792/7 "2024-09-16T21:23:05Z")

</div>

With the addition of Live Previews in the Prismic admin this feels more pressing. We've got many slices that are built around content relationships, right now those all just render as blanks or error messages.

---

<div class="post-metadata">

**Author:** ![come.sabran](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@come.sabran](https://community.prismic.io/u/come.sabran)\
**Post date:** [September 20, 2024, 7:48am UTC](https://community.prismic.io/t/content-relationships-and-slice-machine/9792/8 "2024-09-20T07:48:47Z")

</div>

Hi Sam,

Thanks for your message. We are aware of this issue and have it on our list of feature improvement but we can't share an expected release date for now. The team has recently fixed part of this issue when content relationship fields where used to only link internal pages, but we still don't support the usage of content relationship fields that fetch specific data from another document.

Best,

Côme, Devtools team at Prismic
