Edit button is not always loaded

I am trying to integrate the edit button on my page but it is not appearing for some of the document types.
It looks like it’s appearing basing on /predict API response (executed by prismic script) but for some of the documents, it is always an empty array.
Are there any additional preconditions to enable this feature that are not described in documentation?

/predict is executed with following params:

url: /preview
ref: {{preview token}}
tracker: {{hash - if exists)

Regards :slight_smile:

@hello @olga.giza.ext, welcome to the community forum!

In order to make the in-Website Edit button functionality work, it is necessary to add the Prismic Toolbar to each of the pages of the site. This step is required to have every Custom Type appear in it when needed.

Could you tell me where are you setting the params that you’re sharing and how has this been helpful to understand how the Edit button works?

Also, is this the first time you encounter this issue?


Hello @paulina.gavilan,
Yes, I have added a prismic toolbar to the website.
Params are set by prismic toolbar basing on prismic session cookie and preview endpoint set in prismic preview settings.
For different document types on different pages, the edit button works as expected.

Hey @olga.giza.ext !

You need to make sure that you are adding the toolbar on every page of your application so that it shows in each and every one of the views.

So, if you have, let’s say, two custom types: ‘Home’ and ‘Post’ and only add the script in ‘Homepage’; the edit button for 'Post is not going to appear.