You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Publish button now checks every locale before it publishes a localized document. Before this change, publishing could succeed even when another locale had invalid or missing data. Now the button validates every locale first and blocks the publish action when any locale fails.
Why
A publish action could make one locale public while a sibling locale stayed broken. Nobody noticed the broken locale, because publishing never checked it. This change stops a publish action from hiding a problem in a locale nobody is looking at.
How
The Publish button now calls the on-demand validation endpoint from feat!: add on-demand validation for collections and globals #17557 before it submits a publish request. It sends the active locale's edited data in one call, and every sibling locale's stored data in another.
Sibling locale requests strip localized field values from the submitted data first. This makes sure validation checks each sibling's stored data, not the active locale's unsaved edits.
When a locale fails, the button shows a toast with the locale code and field label for each error, and it does not submit the publish request.
This check only runs for the default action that publishes every locale at once. Publishing one specific locale skips it, because that action only ever affects one locale.
The check runs in the browser and reuses the validation endpoint added in the linked PR, so this change adds no new server behavior.
Breaking changes
Publishing a document with localized fields can now fail when a locale other than the active one has invalid or missing required data. Before this change, a publish action always succeeded regardless of other locales' data. Projects with existing invalid data in a non-active locale must fix that data before they can publish again.
Related work
This change depends on #17557. That PR adds the on-demand validation Local API, REST endpoints, and GraphQL mutations this change calls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge this first: #17557
Summary
The Publish button now checks every locale before it publishes a localized document. Before this change, publishing could succeed even when another locale had invalid or missing data. Now the button validates every locale first and blocks the publish action when any locale fails.
Why
A publish action could make one locale public while a sibling locale stayed broken. Nobody noticed the broken locale, because publishing never checked it. This change stops a publish action from hiding a problem in a locale nobody is looking at.
How
Breaking changes
Publishing a document with localized fields can now fail when a locale other than the active one has invalid or missing required data. Before this change, a publish action always succeeded regardless of other locales' data. Projects with existing invalid data in a non-active locale must fix that data before they can publish again.
Related work
This change depends on #17557. That PR adds the on-demand validation Local API, REST endpoints, and GraphQL mutations this change calls.