Prismic Preview only updates once

Hello,

I'm seeing a new issue with Prismic Previews, using the Nuxt implementation.

To reproduce:

  1. Click into a document in the Prismic CMS
  2. Click preview
  3. Website opens and navigates to the document's page
  4. Make a change in the CMS and save
  5. Website updates content to match saved document
  6. Make another change and save
  7. Website does not update

This is happening on all three of our Prismic-based sites on Chrome. It happens both in a local environment and hosted on Cloudflare Pages.

Previously the websites did update content every time the document was saved, so I'm not sure what has changed here!

Is there something I'm missing? Has anything changed that we need to update on our end?

Happy to provide details of sites, repos etc in private messages.

Thank you!

p.s. I have added both prismic.io and our websites to "Sites that can always use cookies" in Chrome's settings and unfortunately that hasn't helped

Hey @jarod, that's odd. The newest version of the toolbar accepts preview reloads on Nuxt. Which version of the kit are you using?

Hi Pau, we're on "@nuxtjs/prismic": "^1.4.2", which looks like the latest package.

What seems most strange is that the preview reloads once, and then not again until the page is manually reloaded!

Is it possible that there's a setup in your project that clears the preview cookie after the first session is started?

Unfortunately not, I can see the cookie is still there after the session is started. It looks like we just stop pinging for content after the first update — see the network trace here:

image

Those pings are from the Prismic toolbar iframe, and the v2 line is where a document is saved on the CMS side and content is refreshed. There's then no more pings coming from the Prismic toolbar, but it's still visible on-screen :person_shrugging:

I'm digging around in our code but can't see anything that's changed in our implementation of the toolbar in the last month or so!

Hello everyone. We found the root case of the issue and are now working on a fix.
We'll update this same thread when we have updates.

Thanks

Hi @Pau, is there any ETA on a fix for this?

Cheers,
Jarod

Hello @jarod, we released a fix for this issue. Don't hesitate to get in touch with us if this ever occurs again.

Hi @Pau, we are still facing the issue when using prismic client with using react js ?

@Girish_ACHARYA, It’s been a while since this conversation was active, could you clarify what issue you're seeing now?

Are you getting the same error as Jarod, or is this something different?

Let us know so we can help!

I'm having this issue: the preview is working, but the document data shown is outdated. When we click Publish, the preview gets updated — which is strange, because our setup is split as follows:

Main page (server1):
This page doesn’t have the preview script or Slice Machine. It’s built as a static site and doesn’t change until we trigger a rebuild (for security reasons). It’s working perfectly fine.

Slice Machine + Preview (server2):
This server handles all the preview and routing scripts. It uses the same branch as the main page, but it’s dedicated to preview and Slice Machine.

  • Slice Machine: working perfectly.
  • Preview: it loads correctly, but when you make a change in a document and save it, the preview still shows the old data. I also tried creating a release and previewing it — same result, the data is still outdated.

Because the main page is static and lives on a separate server, publishing doesn’t affect it directly. However, when I click Publish, the preview page updates with the new data. I thought the preview functionality was supposed to show the latest document changes without needing to publish them.

Okay, end up being my routing, preview is showing new content in pages where the category is not set, so i will need to check more in deep the routing or the prismicio, because pages from the first and second level are okay “/level1/level2“ but as soon as i have a category “/level1/level2/[category]“ the problem start, the page work, but the preview is showing old data.