0

I'm trying to get external links working via Sanity studio, following the guide here https://www.sanity.io/guides/portable-text-internal-and-external-links.

When working locally I can see the option to "Open in new window" in the editor, but in the live studio it says:

"This field is not defined in the schema, which could mean that the field definition has been removed or that someone else has added it to their own local project and have not deployed their changes yet."

Does anyone know why this is? I've deployed my changes so I'm not sure why it thinks it's not defined in the schema.

blockContent.js

marks: {
        decorators: [
          { title: 'Strong', value: 'strong' },
          { title: 'Emphasis', value: 'em' },
        ],
        
        annotations: [
          {
            name: 'link',
            type: 'object',
            title: 'URL',
            fields: [
              {
                title: 'URL',
                name: 'href',
                type: 'url',
              },
              // External links
              {
                title: 'Open in new window',
                name: 'blank',
                type: 'boolean'
              }
            ],
          },
        ],
      },

Live Studio enter image description here

Local Studio enter image description here

Jacob Collins
  • 173
  • 5
  • 12

1 Answers1

2

always remember to build your local project before deploying it

$ npm run build

$ npm run deploy

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 28 '23 at 09:24