Document sorting not working in Studio (_createdAt, title, _updatedAt)
_createdAtreturns an ever lasting "Loading documents...", by
titlenothing really happens and by
_updatedAtseems to just be the default ordering.
I've uninstalled plugins and generally tried to strip our Sanity setup back to as 'out of the box' as I can but still the issue persists. Was initially using the latest version but have now rolled that back to
v2.26.0with now luck. Oddly I have other setups running this version that work fine, hence me trying to strip current setup back. No dice though.
Any insights into debugging this would be really very helpful, thanks
🙏
I found your exact issue! This was a known bug in Studio v2.30.0 that affected document sorting. Based on a thread from the Sanity community, multiple users experienced the same symptoms you're describing.
The Issue: Version 2.30.0 had a sorting bug that caused:
- Sorting by
_createdAtto hang with endless "Loading documents..." - Sorting by
titleto not work properly _updatedAtappearing to show default ordering
The Solution: The community found that downgrading to v2.28.0 resolved the issue. While v2.26.0 fixed the hanging problem, it had its own sorting bug, so v2.28.0 was the sweet spot.
Steps to fix:
- Delete your
node_modulesfolder - In your
package.json, pin your Sanity version to2.28.0 - Run
yarn install --check-files(ornpm install)
Additional debugging if needed:
Since you mentioned other setups on v2.26.0 work fine, compare your sanity.json configurations between working and non-working projects - there might be a subtle plugin or configuration difference. Also check:
- Browser DevTools Console for any errors when attempting to sort
- Network tab to see if API requests are timing out
- Try clearing your Studio's local storage (DevTools → Application → Local Storage)
The Sanity team acknowledged this bug and worked on a fix, so if you need features from later versions, check if upgrading to the latest Studio v2 release (or consider migrating to Studio v3) resolves it with the official fix in place.
Show original thread9 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.