payload icon indicating copy to clipboard operation
payload copied to clipboard

REST API query using locale=* returns no localized fields at all

Open cbratschi opened this issue 1 year ago • 0 comments

Describe the Bug

This was working fine with Payload 2.x but Payload 3.x returns no localized fields values for locale=*. Switching to locale=all returned again all raw field values.

Example request:

http://localhost:3000/cms/api/pages/64f20533c977b00e9b704ae8?locale=*&fallback-locale=none&depth=0 I had a look at the source code and '*' gets converted to 'all' normally. I would not find any obvious bugs.

Link to the code that reproduces this issue

https://github.com/cbratschi/payload

Reproduction Steps

Use REST API with locale=*.

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

area: core

Environment Info

Binaries:
  Node: 22.9.0
  npm: 10.8.3
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  payload: 3.2.2
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:05:23 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6031
  Available memory (MB): 65536
  Available CPU cores: 16

cbratschi avatar Dec 03 '24 22:12 cbratschi