payload icon indicating copy to clipboard operation
payload copied to clipboard

Only one item in a collection can a version with status "Current Published Version"

Open stofolus opened this issue 2 years ago • 3 comments

Link to reproduction

No response

Environment Info

Node: 20.17.0
npm: 10.8.2
Yarn: N/A
pnpm: 9.0.2

payload: 3.0.0-beta.108 (I have used 108 fresh from the template and 110 in my own project with the same results)
  next: 15.0.0-canary.160
  @payloadcms/db-mongodb: 3.0.0-beta.108
  @payloadcms/email-nodemailer: 3.0.0-beta.108
  @payloadcms/graphql: 3.0.0-beta.108
  @payloadcms/live-preview: 3.0.0-beta.108
  @payloadcms/live-preview-react: 3.0.0-beta.108
  @payloadcms/next/utilities: 3.0.0-beta.108
  @payloadcms/plugin-cloud: 3.0.0-beta.108
  @payloadcms/plugin-form-builder: 3.0.0-beta.108
  @payloadcms/plugin-nested-docs: 3.0.0-beta.108
  @payloadcms/plugin-redirects: 3.0.0-beta.108
  @payloadcms/plugin-seo: 3.0.0-beta.108
  @payloadcms/richtext-lexical: 3.0.0-beta.108
  @payloadcms/translations: 3.0.0-beta.108
  @payloadcms/ui/shared: 3.0.0-beta.108
  react: 19.0.0-rc-5dcb0097-20240918
  react-dom: 19.0.0-rc-5dcb0097-20240918

Describe the Bug

Only the latest saved or restored version in a whole collection can have the status "Current Published Version" on one of it's versions in the version view. This means that if I save Page 1 the latest version of that item will have that status but as soon as I save Page 2 there will be no latest version on page 1.

https://github.com/user-attachments/assets/7f0b8322-d0eb-49ee-a90f-8012c626b293

Reproduction Steps

A fresh template will work and then have two or more pages where you

  1. Check page versions for "Current Published Version"
  2. Make a change and publish that page
  3. Make sure that you now see a "Current Published Version"

Go to another page and repeat and then go back to the first page. The status should now be gone

Adapters and Plugins

No response

stofolus avatar Oct 01 '24 15:10 stofolus

Fixed in https://github.com/payloadcms/payload/pull/8505

r1tsuu avatar Oct 01 '24 18:10 r1tsuu

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Oct 03 '24 04:10 github-actions[bot]

🚀 This is included in version v3.0.0-beta.111

github-actions[bot] avatar Oct 04 '24 18:10 github-actions[bot]