Like what we’re doing? Star us on GitHub!

Enabling version.drafts on existing collection results in having no documents despite ...

wiesson
2 weeks ago
4

Having set

return true

or



return {
  or: [
    {
      _status: {
        equals: "published",
      },
    },
    {
      _status: {
        exists: false,
      },
    },
  ],
};


If I enable it, no documents are visible. I also set

_status

manually to

published

or

draft

but I have a feeling that a relation is required in

_{collection-slug}_versions

otherwise it's not visible?

  • jesschow
    Payload Team
    2 weeks ago

    hi @wiesson - what version of payload are you on?

  • wiesson
    2 weeks ago

    Latest if I’m correct, 1.6.X 🤔

  • jesschow
    Payload Team
    2 weeks ago

    We had a breaking change in 1.6.1 that required migration of document versions, however if your project was created after this release you should not need to migrate.



    Here is more info and the migration script:


    https://github.com/payloadcms/payload/blob/master/CHANGELOG.md#-versions-may-need-to-be-migrate



    And if this isn't applicable, then it may be a bug if we can reproduce it

  • wiesson
    2 weeks ago

    Thank you! The project has been created with 0.18.5 and I'm upgrading regularly and I did run the migration script. But let me check again!

Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More