# Deprecated prismic preview script

**URL:** <https://community.prismic.io/t/deprecated-prismic-preview-script/1065>\
**Category:** Developing with Prismic\
**Tags:** nextjs\
**Created:** [June 30, 2020, 7:02pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065 "2020-06-30T19:02:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![fred](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@fred](https://community.prismic.io/u/fred)\
**Post date:** [June 30, 2020, 7:02pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/1 "2020-06-30T19:02:06Z")

</div>

Hello,  
I am currently receiving

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/1X/fa4348ec41cf82abef8c86cc228e9eb28b933ec5.png) 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](https://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!

---

<div class="post-metadata">

**Author:** ![marcellothearcane](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/marcellothearcane/32/224_2.png) [@marcellothearcane](https://community.prismic.io/u/marcellothearcane)\
**Post date:** [July 1, 2020, 5:36am UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/2 "2020-07-01T05:36:57Z")

</div>

See this thread:

> [@Window.prismic.endpoint is deprecated](https://community.prismic.io/t/window-prismic-endpoint-is-deprecated/484):
>
> Hi, I follow this document to setup preview in my ruby web application - [Prismic’s documentation for PHP, Laravel, Java, .NET, and Ruby has moved to GitHub - Prismic](https://prismic.io/docs/ruby/beyond-the-api/in-website-preview). The Prismic toolbar do not appear and I saw below message in console. What should I follow between the console log and Prismic document?

---

<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:** [July 1, 2020, 9:44am UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/3 "2020-07-01T09:44:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![fred](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@fred](https://community.prismic.io/u/fred)\
**Post date:** [July 1, 2020, 2:50pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/4 "2020-07-01T14:50:23Z")

</div>

Hi Phil,

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

```auto

```

```auto

```

```auto

```

---

<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:** [July 1, 2020, 2:51pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/5 "2020-07-01T14:51:26Z")

</div>

The image or text you added seems to be broken.

---

<div class="post-metadata">

**Author:** ![fred](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@fred](https://community.prismic.io/u/fred)\
**Post date:** [July 1, 2020, 3:25pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/6 "2020-07-01T15:25:42Z")

</div>

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

 ![image.png](https://europe1.discourse-cdn.com/flex013/uploads/prismic/original/1X/831f1a8c4790e2735f854e5f2f71f74fd4998276.png)

---

<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:** [July 1, 2020, 3:45pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/7 "2020-07-01T15:45:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![fred](https://avatars.discourse-cdn.com/v4/letter/f/db5fbb/32.png) [@fred](https://community.prismic.io/u/fred)\
**Post date:** [July 1, 2020, 4:30pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/8 "2020-07-01T16:30:35Z")

</div>

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!

---

<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:** [July 1, 2020, 5:07pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/9 "2020-07-01T17:07:10Z")

</div>

Cool glad you figured it out 🙂

---

<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:** [September 15, 2020, 4:46pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/10 "2020-09-15T16:46:16Z")

</div>



---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/system/32/1746_2.png) [@system](https://community.prismic.io/u/system)\
**Post date:** [December 9, 2021, 5:33pm UTC](https://community.prismic.io/t/deprecated-prismic-preview-script/1065/11 "2021-12-09T17:33:24Z")

</div>


