Issues with publishing and deleting documents using Sanity's Document Internationalization Plugin
I understand you're experiencing a frustrating issue with the Document Internationalization plugin where creating translations from an unpublished base document prevents you from publishing or deleting that base document afterward. This is a known issue with how the plugin manages references between translation documents.
What's happening:
The plugin creates references between your base document and its translations through a separate translation.metadata document. When you create a translation from an unpublished base document, these references can prevent normal publish/delete operations because Sanity sees them as dependencies that need to be maintained.
The solution: Configure weak references
The key fix is to enable weakReferences in your plugin configuration. Add this to your sanity.config.ts:
documentInternationalization({
supportedLanguages: [
{ id: "en", title: "English" },
{ id: "fr", title: "French" }
],
schemaTypes: ['yourSchemaType'],
weakReferences: true // Add this line
})Setting weakReferences: true tells the plugin to keep translation.metadata references weak, which allows you to publish and delete documents independently without Sanity blocking the operation due to reference constraints.
For your simultaneous publishing workflow:
Since you need to publish English and French pages at the same time, you have a couple of good options:
If you're on a Growth plan or higher, Sanity Releases is purpose-built for exactly this use case. It lets you bundle multiple document changes (like your English and French pages) into a single release that can be previewed and published together atomically.
If you're on a Team plan, you can use the Scheduling API's bulk publishing endpoint to publish both documents together in a coordinated way. You can even enable this in the plugin config with
bulkPublish: true.
For existing documents:
If you already have documents created before adding weakReferences: true, you may need to republish both the base and translated documents to trigger the plugin to update the references properly. As noted in this GitHub issue comment, simply republishing both documents will trigger the "updating i18n fields" process, which appropriately updates the references to be weak.
Important note: The configuration option is weakReferences (not referenceBehavior as mentioned in some older discussions). This is the correct property name for the current version of the plugin.
This should resolve both your publishing and deletion issues while supporting your workflow requirement to publish both language versions simultaneously!
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.