Sanity Studio publishes but queries return outdated content (old _updatedAt)
I understand this is a critical production issue. Based on your symptoms, here are the most likely causes and solutions:
Most Likely Cause: API Perspective Configuration
The behavior you're describing—where content appears in preview mode but not in Vision or production queries—strongly suggests a perspective mismatch in your queries.
When you publish a document in Studio, it creates a published version. However, if your queries are using the wrong perspective, they might not be retrieving the published content correctly.
Immediate Diagnostic Steps
1. Check your API version and default perspective
If you recently updated your @sanity/client or API version, this could be the culprit. Note that API version updates require explicit opt-in—projects don't automatically upgrade to new API versions.
2. Verify in Vision
In the Vision tool, explicitly test with different perspectives. Add this to your query parameters:
{"perspective": "published"}Then try:
{"perspective": "raw"}Compare the results. If raw shows your updated content but published doesn't, there's an issue with how the document is being published.
3. Check the document ID directly
In Vision, query for both the draft and published versions:
*[_id == "YOUR_DOCUMENT_ID"]and
*[_id == "drafts.YOUR_DOCUMENT_ID"]This will show you if both versions exist and their respective _updatedAt timestamps.
Potential Causes & Solutions
1. Content Releases (If You're on Growth Plan or Above)
If your organization is on a Growth or Enterprise plan, someone may have enabled Content Releases. When this feature is active, clicking "Publish" doesn't immediately publish—it adds changes to a release bundle instead.
How to check:
- Look for a "Releases" section in your Studio navigation
- If you see an active release containing your changes, you need to publish that release itself
How to fix:
- Navigate to Releases in Studio
- Find the active release
- Publish/apply the entire release
2. CDN or API Caching Issue
While less likely (since Vision queries the API directly), there could be a cache invalidation problem.
How to check:
- Add
?nocache=trueor a random query parameter to your Vision queries - Check if the
_updatedAttimestamp matches what you see in the document inspector
3. Client Configuration in Next.js
Your Next.js client might be configured with an incorrect perspective or caching settings.
Check your Sanity client setup:
// Make sure your client is configured correctly
const client = createClient({
projectId: 'your-project-id',
dataset: 'your-dataset',
apiVersion: 'your-api-version',
useCdn: false, // Try setting this to false temporarily
perspective: 'published', // Explicitly set this
})For preview mode, you should be using perspective: 'previewDrafts'.
Immediate Action Plan
Check for Content Releases first - This is the most common cause of this exact symptom pattern. Look in your Studio navigation for a "Releases" section.
Verify your API client configuration - Ensure
useCdn: falsetemporarily to rule out CDN issuesTest with explicit perspectives - Use Vision to confirm which perspective returns correct data
Check recent configuration changes - Review any recent updates to
sanity.config.ts,sanity.cli.ts, or your Next.js client setup
If Nothing Works
If none of the above resolves the issue:
- Check your dataset transaction history to confirm the publish action actually occurred
- Contact Sanity support directly through the help chat in your project dashboard—they can check server-side logs
- Try creating a completely new test document and publishing it to see if the issue is document-specific or system-wide
The fact that preview mode works correctly is actually good news—it means your data is there and your Studio is functioning. This is almost certainly a configuration or perspective issue rather than data loss or a platform bug.
Show original thread116 replies
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.