Skip to content

Stale dialog opens incorrectly due to defaultLocalePublishOption #16376

@PH1P5

Description

@PH1P5

Describe the Bug

Having more versions of a collection the stale dialog opens after publishing and changing it, even if it is impossible that the collection has been changed by another user. This happens if the autosave in versions configuration of that collection is disabled and the page/collection config has a localized field in combination with the global defaultLocalePublishOption configured to 'active'.

Link to the code that reproduces this issue

https://github.com/PH1P5/payload-stale-issue-with-defaultLocalePublishOption

Reproduction Steps

  1. clone the repo, install dependencies
  2. start the app e.g. in dev mode
  3. create a page in the payload backend and press "Publish in en" to publish it
  4. change the page (e.g. page title) press "Publish in en" to publish it
  5. change the page again press "Publish in en" to publish it
  6. now, having 2 versions of the page, change its content (e.g. page title)
    actual: Stale dialog appears
    expected: No Stale dialog - Editors are able to proceed changing the page content

Which area(s) are affected?

Not sure

Environment Info

Since payload version 3.78.0 we see this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs-triagePossible bug which hasn't been reproduced yetv3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions