Deprecated prismic preview script

Hello,
I am currently receiving

After implementing the suggested script in the _document.js of my next.js app, I am unable to preview the content. I went to the documentation and it is suggesting the deprecated version. Here is the script I am trying to implement for reference

script async defer src="//static.cdn.prismic.io/prismic.js?repo=my-test-repo&new=true"

(had to remove the <> so it would appear in this post)
I would appreciate any guidance.

Thank you!

See this thread:

Hi Fred,

Welcome to the community!

It might be a case that your repository doesn’t have access to the new toolbar. Can you share with me the suggested script in the Previews section of your repository settings?

This will help me confirm, then I can change it for you if needed.

Thanks.

Hi Phil,

Thank you for reaching out! Here is the suggested script.



The image or text you added seems to be broken.

Sorry about that, let me try to screenshot it instead.

No worries. Can you try copying and pasting this code instead of the one from the warning in meta.js file of you next.js app?

Yeah, that worked fine for me but was getting the warning. I ended up figuring out that the repo name is actually myutrcom so the updated script is working for me now!

1 Like

Cool glad you figured it out :slight_smile: