payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
24.94k stars 1.59k forks source link

Plugin SEO: Issue with publishing collections by language #9017

Closed italodr closed 1 hour ago

italodr commented 1 day ago

Describe the Bug

An error occurs the first time you try to publish a single language. However, if you publish all the languages ​​at once and then unpublish them again, it does allow you to publish a single language.

Image Image

Link to the code that reproduces this issue

https://github.com/italodr/payload-test/tree/issue-publishing-by-language-seo

Reproduction Steps

  1. Clone the above repository
  2. Update the config file to add your postgres URL. Currently as "postgresql://postgres:password123@127.0.0.1:5430/postgres_db"
  3. Run pnpm install to install dependencies
  4. Run pnpm dev _community to start the admin panel
  5. Access the admin panel
  6. Add new post in all languages and save them as "Draft"
  7. Change language to "Deutsch"
  8. Click on "Publish in Deutsch"

Which area(s) are affected? (Select all that apply)

plugin: seo, Not sure

Environment Info

Payload: 3.0.0-beta.123 Node.js: v20.12.2 Next.js: 15.0.0

paulpopus commented 1 hour ago

This will be fixed with https://github.com/payloadcms/payload/pull/8719