payloadcms/payload

Moving document to folder not working with localization.fallback = false config

Closed this issue · 2 comments

Describe the Bug

Hi!

In a project where we don't want localization fallback I found an issue with folders.

When trying to move a document which only has content in one locale into a folder, the request will fail due to validation triggering for all locales of that document.

{
"docs": [],
"errors": [
{
"id": "68c94944f81664ad280926c8",
"message": "The following field is invalid: Title"
}
],
"message": "Unable to update 1 out of 1 Page."
}

Steps to reproduce:

  • disable localization fallback in payload.config.ts
  • have a localized field on pages.ts collection
  • Add a new page and only for one locale. Do not add info on all locales.
  • open folder view
  • try to move page into folder
  • observe network tab for error

Possible solution: pass current locale to api call

Reproduction case is available on branch folders-locale-fallback-false of github repo

Link to the code that reproduces this issue

https://github.com/jakobpevec/payload-locale-filter-bug-repro/tree/folders-locale-fallback-false

Reproduction Steps

Steps to reproduce:

  • disable localization fallback in payload.config.ts
  • have a localized field on pages.ts collection
  • Add a new page and only for one locale. Do not add info on all locales.
  • open folder view
  • try to move page into folder
  • observe network tab for error

Possible solution: pass current locale to api call

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

area: core

Environment Info

Binaries:
  Node: 20.18.1
  npm: 10.8.2
  Yarn: N/A
  pnpm: 10.15.0
Relevant Packages:
  payload: 3.51.0
  next: 15.4.4
  @payloadcms/db-mongodb: 3.55.1
  @payloadcms/email-nodemailer: 3.51.0
  @payloadcms/graphql: 3.51.0
  @payloadcms/next/utilities: 3.51.0
  @payloadcms/payload-cloud: 3.51.0
  @payloadcms/richtext-lexical: 3.51.0
  @payloadcms/translations: 3.51.0
  @payloadcms/ui/shared: 3.51.0
  react: 19.1.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Jul 14 11:30:40 PDT 2025; root:xnu-11417.140.69~1/RELEASE_ARM64_T6041
  Available memory (MB): 49152
  Available CPU cores: 14

🚀 This is included in version v3.56.0

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