Recall CMS history in Sanity v3.10.0 after crash

5 replies
Last updated: Jun 6, 2023
Hey! Have experienced the same crash ^ and also looking for an option to recall the cms' history? Am using ^3.10.0 version. Thanks!
AI Update

I understand you're experiencing crashes in Studio v3.10.0 and looking for how to access document history. Let me help with both issues!

Accessing Document History

Sanity Studio has a built-in Document History feature that lets you view and restore previous versions of your documents. You can access it in two ways:

  1. Click the document status indicator at the bottom of the editor view
  2. Open the contextual menu (three dots/ellipsis icon) in the top right corner and select "History"

From there, you can see all changes, who made them, and roll back to any previous version within your retention period.

History Retention by Plan

Keep in mind that history retention depends on your plan:

  • Free Plan: 3 days
  • Growth Plan: 90 days
  • Enterprise Plan: 365 days (customizable)

If you need to restore a document programmatically or if it was deleted, you can also use the History API to retrieve previous versions and restore them using the JavaScript client's createOrReplace() method.

About the Crash

Regarding the crash you mentioned - Studio v3.10.0 is quite old at this point. I'd recommend upgrading to the latest v3 version (or considering Studio v4 if you're on Node.js 20+) as many stability issues have been fixed in newer releases. If you're seeing specific error messages or can share more details about when the crash occurs, that would help the community provide more targeted advice.

If the crash is causing you to lose work, the good news is that Sanity automatically saves document patches in real-time, so your document history should contain your recent changes even if Studio crashed before you explicitly saved.

Show original thread
5 replies
hiya! 🙂 Yes this is my error. It only occurs when I'm running it locally (on Chrome). I've managed to get it back up for a while by changing the field names in a "Posts" schema, which is where this error is occurring, and then it crashed again. Only thing that helped was that it wiped all the CMS data.Console is showing this same error - have tried updating Sanity and still getting this same error. Grateful for any tips!
user B
This looks like you’re returning an empty string somewhere where a React component is expected. Do you have somewhere in your schema where you’re specifying an empty string (either as the value or a fallback value) for
preview.prepare.media
? For example:

preview: {
  select: {
    title: 'title',
    myImage: 'myImage',
  },
  prepare: ({ title, myImage }) => {
    return {
      title,
      media: myImage || '',
    };
  },
},
Right! My value was incorrect for my
media
specification for my
preview.prepare.media
. Thank you so much ❤️
Glad you got it straightened out! 🙌

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?