Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

join into localized array does not work #10356

Open
Xiphe opened this issue Jan 4, 2025 · 0 comments · May be fixed by #10382
Open

join into localized array does not work #10356

Xiphe opened this issue Jan 4, 2025 · 0 comments · May be fixed by #10382
Assignees

Comments

@Xiphe
Copy link

Xiphe commented Jan 4, 2025

Describe the Bug

Hey lovely payload people <3

Given fields:

{
  name: 'section',
  localized: true,  // <--- toggle here
  type: 'array',
  fields: [
    {
      name: 'image',
      type: 'relationship',
      relationTo: 'media',
    },
  ],
}

The following join causes an error:

{
  name: 'usedIn',
  type: 'join',
  collection: 'posts',
  on: 'section.image',
}

Error:

InvalidFieldJoin: Invalid join field usedIn. The config does not have a field 'section.image' in collection 'posts'.

Link to the code that reproduces this issue

https://github.com/Xiphe/payload-join-localized-array/tree/localized-array-deep-join

Reproduction Steps

  1. check out https://github.com/Xiphe/payload-join-localized-array/tree/localized-array-deep-join
  2. run pnpm i
  3. run pnpm test:int _community
  4. see error
  5. remove localized: true from test/_community/collections/Posts/index.ts
  6. re-run pnpm test:int _community
  7. see no error

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

Not sure

Environment Info

Sidenote: `pnpm payload info` produces ` ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command "payload" not found`



Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: N/A
  pnpm: 9.15.2
Relevant Packages:
  payload: 3.14.0
  next: 15.1.3
  @payloadcms/db-postgres: 3.14.0
  @payloadcms/live-preview-react: 3.14.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
@Xiphe Xiphe added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Jan 4, 2025
@r1tsuu r1tsuu self-assigned this Jan 5, 2025
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants