-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Describe the Bug
Given a document with required localized fields that are incomplete in locale fr
When clicking the general "Publish" button on locale en
where everything is complete
Then the document is marked as "Published" anyway although validation would not pass on the incomplete locale.
This seems to happen because validation is only run on the currently selected locale.
What I expect to happen:
- The general "Publish" button should throw a validation error if not all locales pass validation
- The specific "Publish in en" should work if that specific locale passes validation
Additionally I think this issue #4194 mentions confusions with how this publish individual locales buttons work, which I do agree with. Currently I think it is a little error-prone and difficult to understand as a CMS user what happens when clicking publish, especially with this bug.
Link to the code that reproduces this issue
https://github.com/sacha-c/payload/tree/reproduction/localization-draft-validation
Reproduction Steps
- Create a new Post
- Switch to locale
fr
- Fill in the
Title
with a value - Click on
Publish
- See that the document is marked as Published
- Switch to locale
en
- See that the document is marked as Published, but the
Title
is missing⚠️
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
payload: 3.50.0
node.js: v23.11.0
next.js: 15.4.4