i can't delete any documents from my studio right now 🤔 when i click delete, nothing happens, not even a console error

12 replies
Last updated: Feb 2, 2021
i can't delete any documents from my studio right now 🤔 when i click delete, nothing happens, not even a console error
AI Update

This is a frustrating issue! When the delete button doesn't work with no console errors, it's almost always a permissions problem. Here's what to check:

Check Your Role Permissions

The most common cause is that your user role doesn't have delete permissions. In Sanity, there are default roles that include:

  • Administrator - Full access to all datasets and project settings
  • Editor (Growth/Enterprise) - Read and write access with limited project settings
  • Developer (Growth/Enterprise) - Read and write access with developer project settings
  • Contributor (Growth/Enterprise) - Read and write access to draft content, but cannot publish or unpublish
  • Viewer - Read-only access

The critical thing to understand is that delete permissions require the "Publish" permission level. Some roles allow you to create and update documents but don't include the ability to delete them.

Custom Roles Can Restrict Deletion

If you're on an Enterprise plan, your organization might be using custom roles with specific permission levels. The permission levels for content resources include:

  • No access - Complete restriction
  • Read - View-only access
  • Update and Create - Can create and edit, but NOT delete
  • Publish - Full permissions including delete and publish/unpublish

If you have "Update and Create" permissions, you can edit documents but the delete button won't work. This is exactly the symptom you're experiencing - the button appears clickable but nothing happens when you click it.

How to Fix It

  1. Check your role: Go to sanity.io/manage, select your project, and look at the Members section to see what role you have

  2. Ask for elevated permissions: You'll need someone with Administrator rights to either:

    • Assign you a role that includes the "Publish" permission level (Administrator, Editor, or Developer all have delete capabilities)
    • For Enterprise plans: Modify your custom role to grant "Publish" level permissions, which includes the ability to delete

Other Things to Check

  • Content Resources with GROQ filters: If your organization uses custom roles with content resources, you might have full access to some documents but restricted access to others based on GROQ filter rules. The same role might let you delete some documents but not others.

  • Dataset privacy: Make sure you're working in the correct dataset and that your role has appropriate permissions for that specific dataset

  • Multiple roles: Remember that Sanity roles are additive - if you have multiple roles, you get the combined permissions of all of them. But if none of your roles include "Publish" level permissions, you still won't be able to delete.

The silent failure (no error message) is confusing, but it's by design - Sanity hides or disables actions you don't have permission to perform. Check with your project administrator to get the appropriate permissions!

I can confirm. Can you try the keyboard shortcut (Ctrl-Opt-D)?
keyboard shortcut is not working for me either
i ran
sanity upgrade
earlier today and then ran into this issue - perhaps related?
Yes, it’s related to 2.3.0 as I did the same.
Is it urgent that you delete the document? If so, you could use the API CLI.
thanks
user A
, it's not urgent, but good to know deleting via CLI should still work for now
Same happened just to me. Anyone aware of it already
user G
user Y
?
user E
I submitted an issue on GitHub.
user A
Great! Thanks! 😊
@sanity/desk-tool
was just updated to 2.3.1, which fixes this issue.
Thanks!
thanks
user A
and also thanks to the sanity team for resolving this so quickly

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?