Sanity Pioneers: Get early access to betas, extra AI credits, and a direct line to the engineering team. Apply now →

Can't update published document after draft loses "draft." prefix

8 repliesLast updated: Nov 30, 2025

Hello there 🖖
We currently have a problem with Sanity datasets, actually, with one of the datasets.

In a particular document type, the user can start creating a document and it is saved as a draft, so far so good, once the document is published, the document id changes from
draft.123**456
to
123**456
, everything OK, as expected, but it does not allow to update it anymore. We have tried with the cli import script into another dataset we have and works, but not on this one.
Has anyone experienced a similar problem? Or do you have ideas on how to debug this better? Thanks in advance
AI Update

This sounds like a frustrating issue! The good news is that the draft-to-published ID change you're seeing (draft.123**456 → 123**456) is completely normal Sanity behavior. The problem where you can't update the published document could be caused by a few things:

Most Likely Causes

1. Dataset Read-Only Mode

First thing to check: Is your dataset in read-only mode? This can happen if:

Check this at sanity.io/manage → Select your project → Datasets → Look for any read-only indicators or warnings.

2. Permissions/Role Issues

Since you mentioned it works in another dataset but not this one, check the permissions and roles:

If you're using custom roles (Enterprise feature), make sure the content resources aren't blocking updates to published documents.

3. Revision ID Conflicts (409 Errors)

If you're getting 409 conflict errors, this relates to optimistic locking and concurrency control. This happens when:

Solution: Refetch the document before updating, or use the ifRevisionID parameter in your mutations to handle conflicts gracefully.

Debugging Steps

Additional Considerations

The fact that your CLI import script works in another dataset strongly suggests this is either a permissions issue or a dataset-level configuration problem rather than a bug with the documents themselves.

What to look for specifically: When you try to update the published document, open your browser's developer tools (Network tab) and look at the failed request. The HTTP status code and response body should give you the exact error message that'll point to the root cause.

Let us know what error messages you're seeing - that'll help narrow it down!

Show original thread
8 replies

Was this answer helpful?

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.

Related contributions