payloadcms / payloadcms/payload

`locale: 'all'` with Local API not updating localized fields.

Open
#16,345 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: core stale status: needs-triage
Dominant language
TypeScript
Stars
44.8k
Forks
4.2k
Avg merge
2d 21h
Merged PRs (30d)
53

Description

Describe the Bug

When using the locale: 'all' option in the local update API all fields get updated except for the localized ones.

Link to the code that reproduces this issue

https://github.com/MartijnDeRoode/payload-reproductions

Reproduction Steps
  1. Clone the repository
  2. Install dependencies & run
  3. Create a post through the admin panel
  4. Go to http://localhost:3000/api/post/test/{id}, this will randomly generate a string and put it in all 3 fields. (1 normal and 2 localized.)
  5. Check the response or the admin panel. You will find that only the first text field is updated.
Which area(s) are affected?

area: core

Environment Info
Binaries:
  Node: 22.17.0
  npm: N/A
  Yarn: N/A
  pnpm: 9.7.0
Relevant Packages:
  payload: 3.83.0
  next: 16.2.3
  @payloadcms/db-mongodb: 3.83.0
  @payloadcms/graphql: 3.83.0
  @payloadcms/next/utilities: 3.83.0
  @payloadcms/richtext-lexical: 3.83.0
  @payloadcms/translations: 3.83.0
  @payloadcms/ui/shared: 3.83.0
  react: 19.2.4
  react-dom: 19.2.4
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home
  Available memory (MB): 65375
  Available CPU cores: 24

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by cloning the linked payload-reproductions repository and following its setup and reproduction steps for the local API endpoint at /api/post/test/{id}. Trace how locale: 'all' is handled during the update, then verify that both localized fields update alongside the normal field in the response and admin panel.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, nextjs, typescript
Domain
api, backend, localization
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.