Document is displayed even though it ONLY exists in the versions collection

default discord avatar
Alessio 🍣
2 months ago
8

See the screenshots. The document only exists in the versions collection in mongodb - not in the main collection.


However, it's still shown in the admin panel. When I click on it, it says "Nothing Found".



There doesn't seem to be a way to remove it in the admin panel.



How does that happen, and how can I remove it?





Looks like it

might

be a bug? If a document is only present in versions as "parent", but not present in the main mongodb collection, I wouldn't expect it to be shown



Document is displayed even though it ONLY exists in the versions collection



Would probably be best if payload has a check for versions where the "parent" field does not exist anymore.



Then payload could show them in some kind of "Bin" or "Recently Deleted", instead of showing them in the main document list where you cannot open them anymore.

  • discord user avatar
    Jarrod
    Payload Team
    2 months ago

    Interesting… docs should clean up their versions when deleted. I wonder what chain of events occurred causing this one to not clean up after itself

  • default discord avatar
    Alessio 🍣
    2 months ago

    Yea something happened and I have no idea why or what

  • discord user avatar
    Jarrod
    Payload Team
    last month

    @Alessio 🍣 have you run into this again?

  • default discord avatar
    Alessio 🍣
    last month

    Nope! I ended up just manually removing the affected versions from the database. Still not sure what caused it

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.