diff --git a/studio/lib/queries/page.ts b/studio/lib/queries/page.ts index d25aa3e05..75a300223 100644 --- a/studio/lib/queries/page.ts +++ b/studio/lib/queries/page.ts @@ -77,7 +77,7 @@ export const SLUG_QUERY = groq` `; export const SEO_SLUG_QUERY = groq` - *[_type == "pageBuilder" && slug.current == $slug][0]{ + *[defined(seo) && slug.current == $slug][0]{ "title": seo.seoTitle, "description": seo.seoDescription, "imageUrl": seo.seoImage.asset->url diff --git a/studio/schemas/documents/specialPages/customerCasesPage.ts b/studio/schemas/documents/specialPages/customerCasesPage.ts index 61f3a2b9b..8d17f527d 100644 --- a/studio/schemas/documents/specialPages/customerCasesPage.ts +++ b/studio/schemas/documents/specialPages/customerCasesPage.ts @@ -1,6 +1,7 @@ import { defineType } from "sanity"; import { title } from "studio/schemas/fields/text"; +import seo from "studio/schemas/objects/seo"; import { titleSlug } from "studio/schemas/schemaTypes/slug"; export const customerCasesPageID = "customerCasesPage"; @@ -17,6 +18,7 @@ const customerCasesPage = defineType({ "Enter the primary title that will be displayed at the top of the customer cases page. This is what users will see when they visit the page.", }, titleSlug, + seo, ], preview: { select: {