I got an issue to delete collection items from the admin dashboard, so I decided to temporarily delete some of them manually from the vscode mongo extension. But They are still on the admin dashboard.
Ensure that your documents were in fact deleted. Sounds like the extension may have failed to execute. Have you tried using MongoDB Compass instead? That will provide a nice GUI for you to perform these tasks.
https://www.mongodb.com/products/tools/compassHi
@808734492645785600, Yeah the docs are actually deleted in doc library, but there are some docs in admin that I can not even delete them.
and when you open them, Nothing found message appear on payload admin. I don't know if the reason is versions of docs, or delete docs manually from database is a totally wrong thing..
I can not even delete the healthy docs; "An unknown error has occurred."
Is that only throwing an error when deleting through the list view? Are you able to navigate to the document and delete them there?
no, when I open these selected docs "Nothing found" appears.. they are not exist anywhere.
actually I've found recently whatever I create even a simple draft, it's not going to delete anymore, and will stuck on the list. non of other collections has this problem.
Is this the only collection with drafts enabled?
yes and actually I don't have too much collections, it just blogs, media and users.
and also for blogs we've populateAuthors, revalidateBlog and revalidateDelete Hooks, but the issue is still there with or whitout Hooks.
this is the entire blogs schema
I've to mention, there is struggle with related options as well, when I try to open "relatedBlogs" field, it will stuck on loading and err:
TypeError: undefined is not an object (evaluating 'Tt.docs.length')
your support means alot!
I tried to disable versions and check again. some of buggy docs in blogs collection list gone. but still the problem with deleting docs and relatedBlog field is there.
I'm really confused by what happens in my project, I would be grateful if you look at the collection code and give me some advice to check blind spots.
Are there any errors logged to your console on delete? I'm unable to recreate this within our test suite. I would remove as much as possible from your config to try and narrow down the issue. Once it's in a working state, start adding your changes back in line by line.
no err in console or terminal
I almost try to remove everything, versions, blocks, tabs (one by one), hooks, nothing nothing works, I don't know what should I do
Hooray! it is solved, it was because of an old fetch utilities from previous logic that cause this unknown interuption.
Thanks
@808734492645785600last question, there are still those buggy docs in the admin list, what do you suggest? Is it safe to delete versions manually from db?
Yea if those docs don't exist anymore, you can safely delete their corresponding documents from the version table. Just be sure that the versions your deleting correspond to the actual documents that no longer exist.
I deleted versions of docs, buggies gone, but correct docs are also gone. Hopefully they were samples.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.