{repoURL}/toolbar/state is returning a 404; Previews not working

Hi there,

I'm having trouble loading the preview functionality on the frontends pointing to my repository.

It appears that the preview toolbar JS bundle is accessing {repoURL}/toolbar/state but is receiving a 404.

For example (I can DM support staff the actual repository name):
https://my-repo-name.prismic.io/toolbar/state

In comparison, if I create a new test repository and attempt to load the same URL, everything seems to be working fine:
https://nuxt-prismic-previews-test.prismic.io/toolbar/state

This is causing previews to fall down completely on local and remote SSG sites.

Could you please advise?

Hi Aaron,

Welcome to the community!

Can you send a private message with your full repo name to the @Team-Education ?

Thanks.

Sent a DM your way :white_check_mark:

I see the issue now. I'll forward this to the team to see what this might be.

Hi @aaron1,

So I checked this out and the first repo was on the old preview toolbar which didn't have the state.

I've updated this for you to the new toolbar and this should work.

Thanks.

Thanks Phil, everything seems to be working well!

I had previously been using previews on this repository without issue, and I did not change the toolbar JS used on the frontend to activate previews. My understanding is that if it was working previously, then the repo must have been setup with the appropriate preview toolbar backend.

I'm curious how this occurred and if there is anything our team can do in the future to prevent sudden rollbacks to the "old preview toolbar" on the admin panel / "writing room" side of things?

Would you recommend we create tests for the {repoURL}/toolbar/state endpoint to keep our eyes out for regressions?

Hey Aaron,

This one was my bad it seems, I believe your team requested the deactivation of Slice Machine and in that process, I moved the repo on to an older group with the old toolbar.

There's no need to set up and tests as the likelihood of someone moving you to an old group like that again is minuscule.

1 Like

Sounds good Phil, thanks for the clarifications :+1:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

For anyone seeing this in the future, it means you are on V1 of the toolbar. You can check this by checking https://my-repo-name.prismic.io/toolbar/state or check if the preview script in your repo settings includes new=true.

To have the new toolbar/edit button activated on your repo you can contact the Activations Team as described here:

Thanks.