Skip to content

Multi Tenant Plugin - Issue with versions. #11071

@nunesunil

Description

@nunesunil

Describe the Bug

Hi @JarrodMFlesch , there's an issue in versions for collections with multi-tenancy plugin. I have used the payload multi tenancy example to reproduce this issue with Version enable for Page Collection.

[19:23:44] ERROR: Cannot find field for path at tenant err: { "type": "APIError", "message": "Cannot find field for path at tenant", "stack": APIError: Cannot find field for path at tenant at getTableColumnFromPath (webpack-internal:///(rsc)/./node_modules/.pnpm/@payloadcms+drizzle@3.22.0_@libsql+client@0.14.0_@types+react@19.0.1_payload@3.22.0_gra_18a45a32524f937fd5fcab94be82d61d/node_modules/@payloadcms/drizzle/dist/queries/getTableColumnFromPath.js:582:11) at parseParams (webpack-internal:///(rsc)/./node_modules/.pnpm/@payloadcms+drizzle@3.22.0_@libsql+client@0.14.0_@types+react@19.0.1_payload@3.22.0_gra_18a45a32524f937fd5fcab94be82d61d/node_modules/@payloadcms/drizzle/dist/queries/parseParams.js:60:242) at buildAndOrConditions (webpack-internal:///(rsc)/./node_modules/.pnpm/@payloadcms+drizzle@3.22.0_@libsql+client@0.14.0_@types+react@19.0.1_payload@3.22.0_gra_18a45a32524f937fd5fcab94be82d61d/node_modules/@payloadcms/drizzle/dist/queries/buildAndOrConditions.js:14:88) at parseParams (webpack-internal:///(rsc)/./node_modules/.pnpm/@payloadcms+drizzle@3.22.0_@libsql+client@0.14.0_@types+react@19.0.1_payload@3.22.0_gra_18a45a32524f937fd5fcab94be82d61d/node_modules/@payloadcms/drizzle/dist/queries/parseParams.js:37:123) at buildQuery (webpack-internal:///(rsc)/./node_modules/.pnpm/@payloadcms+drizzle@3.22.0_@libsql+client@0.14.0_@types+react@19.0.1_payload@3.22.0_gra_18a45a32524f937fd5fcab94be82d61d/node_modules/@payloadcms/drizzle/dist/queries/buildQuery.js:25:77) at find (webpack-internal:///(rsc)/./node_modules/.pnpm/@payloadcms+drizzle@3.22.0_@libsql+client@0.14.0_@types+react@19.0.1_payload@3.22.0_gra_18a45a32524f937fd5fcab94be82d61d/node_modules/@payloadcms/drizzle/dist/find/findMany.js:29:119) "data": null, "isOperational": true, "isPublic": false, "status": 500, "name": "APIError" } ⨯ [TypeError: Cannot read properties of undefined (reading 'map')] { digest: '918307918' }

Screen.Recording.2025-02-09.at.7.23.36.pm.mov

Link to the code that reproduces this issue

https://github.com/nunesunil/payload-issues/blob/main/src/collections/Pages/index.ts

Reproduction Steps

https://github.com/nunesunil/payload-issues

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

plugin: other

Environment Info

Binaries:
  Node: 22.13.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.2.1
Relevant Packages:
  payload: 3.22.0
  next: 15.1.6
  @payloadcms/graphql: 3.22.0
  @payloadcms/next/utilities: 3.22.0
  @payloadcms/richtext-lexical: 3.22.0
  @payloadcms/translations: 3.22.0
  @payloadcms/ui/shared: 3.22.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.3.0: Thu Jan  2 20:24:23 PST 2025; root:xnu-11215.81.4~3/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 10

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions