Empty collection after manual JSON import

default discord avatar
pooledge
6 months ago
1

I'm new to PL and Mongo. I've imported 2 JSONs like, let's say, Categories and Posts, which are in a relation to each other. Now I can cross-see them in PL as a choice in a relationship field, but both collection lists are showing empty with an XHR response like:


{
    "docs": [],
    ...
}


MongoDB Compass showing all entries, and I've tried to

reIndex()

both collections with no avail. It must be something very simple I'm missing here...



To answer my own question:

_COLLECTIONNAME_versions

must also be imported if versioning is enabled

    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.