Issue with deleting objects in Sanity.io UI, objects still appear even after deletion.

31 replies
Last updated: Mar 1, 2022
good mornin....for some reason I cannot delete objects. I deleted them but they still show in the UI. but when clicked the data is all blank for all the objects as tho it was deleted from the db but not from being displayed in the UI for some reason
Feb 28, 2022, 5:28 PM
Hi, are you talking about the front end like Next or Gatsby?
Feb 28, 2022, 5:28 PM
no I mean from the Admin sanity.io front end
Feb 28, 2022, 5:29 PM
Hi User. Could you please post a screenshot or a sample of your JSON? As you’re expecting, an object should be unset when it’s removed.
Feb 28, 2022, 5:40 PM
I"m trying to delete via the sanity UI
Feb 28, 2022, 5:40 PM
one second
Feb 28, 2022, 5:41 PM
each of the objects you see in colors has already been deleted thru the UI
Feb 28, 2022, 5:42 PM
JSON looks like
Feb 28, 2022, 5:42 PM
this is happening for the size collection too
Feb 28, 2022, 5:43 PM
That
_type
is for the document itself. Do I understand correctly that you’re seeing that when you first create a document?
Feb 28, 2022, 5:44 PM
These documents were created using an application i wrote in node...i then came to the UI to delete them so i could rerun the application and now they appear to not be deleted
Feb 28, 2022, 5:46 PM
Hi User. Could you please post a screenshot or a sample of your JSON? As you’re expecting, an object should be unset when it’s removed.
Feb 28, 2022, 5:40 PM
this is what's left after the delete...it seems the data was deleted but somehow it still shows up in the sanity UI
Feb 28, 2022, 5:46 PM
I"m trying to delete via the sanity UI
Feb 28, 2022, 5:40 PM
one second
Feb 28, 2022, 5:41 PM
I think what you’re seeing here is the Studio in its state preparing to create a new document. If this were the old (i.e., deleted) document, it would need to have an
_id
as well.
Feb 28, 2022, 5:48 PM
each of the objects you see in colors has already been deleted thru the UI
Feb 28, 2022, 5:42 PM
well i have tried to delete these documents and they do not go away
Feb 28, 2022, 5:48 PM
You’ll see exactly this (just a
_type
) when you create a new document in the studio.
Feb 28, 2022, 5:48 PM
JSON looks like
Feb 28, 2022, 5:42 PM
So the document still exists? Which one are you deleting?
Feb 28, 2022, 5:49 PM
i tried bulk delete to delete all...and i have tried single delete on several of the documents
Feb 28, 2022, 5:49 PM
this is happening for the size collection too
Feb 28, 2022, 5:43 PM
yes they still exist but without the original data
Feb 28, 2022, 5:49 PM
as you can see each document has a title in the UI...but the data does not reflect a title
Feb 28, 2022, 5:50 PM
now i get this...
Feb 28, 2022, 5:51 PM
i cannot even get into my sanity io desktop now
Feb 28, 2022, 5:52 PM
this unhandled error was not happening until just now
Feb 28, 2022, 5:53 PM
That’s a different issue and likely related to this . I will come back to your document issue in a bit.
Feb 28, 2022, 5:53 PM
Thanks for your patience, User. The inability to delete could have been related to that mutations issue. I’d be curious to know what happens if you try now (that issue is resolved).
Feb 28, 2022, 6:39 PM
it works for sure now
Mar 1, 2022, 5:57 PM
Awesome. Sorry about that. Glad you’re back up and running.
Mar 1, 2022, 5:58 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?