content icon indicating copy to clipboard operation
content copied to clipboard

Studio: Cannot override `seo` and `navigation` with `editor({ hidden: true })` since v3.7

Open maximepvrt opened this issue 3 months ago • 2 comments

Environment

x

Version

v3.7.1

Reproduction

Currently, if I try:

property(seo: z.intersection(
    z.object({
      title: z.string().optional(),
      description: z.string().optional(),
      meta: z.array(z.record(z.string(), z.any())).optional(),
      link: z.array(z.record(z.string(), z.any())).optional(),
    }),
    z.record(z.string(), z.any()),
  ).optional().default({})).editor({ hidden: true }),
  navigation: property(z.union([
    z.boolean(),
    z.object({
      title: z.string(),
      description: z.string(),
      icon: z.string(),
    }),
  ]).default(true)).editor({ hidden: true }),

Studio throws an error on load.

Image

Description

Since version 3.7, it is no longer possible to override the seo and navigation attributes as documented in order to add editor({ hidden: true }). Previously, this worked without issues.

Additional context

No response

Logs


maximepvrt avatar Oct 08 '25 21:10 maximepvrt

@maximepvrt is this still valid using commit release of main branch? Is this happens only inside Studio? If so could you provide a reproduction project, so I can import and test?

farnabaz avatar Oct 27 '25 15:10 farnabaz

@farnabaz Yes, it still happens with the latest commit release from the main branch. Here’s my reproduction project: https://github.com/maximepvrt/nuxt-content-studio-error

You can also see the issue directly on Studio: https://nuxt.studio/maximepvrt/nuxt-content-studio-error/content?valueId=about.md&refId=main

Image

Anyway, with the new property().editor({ hidden: true }) option, it would make sense to be able to hide fields without having to redefine them.

maximepvrt avatar Oct 27 '25 16:10 maximepvrt