#Field config not found for _users.auth.tenants.tenant

12 messages · Page 1 of 1 (latest)

raw matrix
#

In the payload v3 multi-tenant example, an error is logged when adding a tenant in the create user page: /admin/collections/users/create. This happens everytime Add Tenant is clicked, even if tenants array doesn't have any fields.

Multi-tenant example: https://github.com/payloadcms/payload/tree/main/examples/multi-tenant

Steps to reproduce:

  1. Log in using [email protected]
  2. Click Users collection
  3. Click Create New
  4. Click Add Tenant

See error below. Because of this, some field config such as filterOptions and admin doesn't work for fields inside the tenants array.

Note that this only happens when creating a new user and not when editing an existing user.

err: {
      "type": "Error",
      "message": "Field config not found for _users.auth.tenants.tenant",
      "stack":
          Error: Field config not found for _users.auth.tenants.tenant
              at addFieldStatePromise (webpack-internal:///(rsc)/./node_modules/@payloadcms/ui/dist/forms/fieldSchemasToFormState/addFieldStatePromise.js:558:15)
              at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      ...
      ...
      ...
      more errors here
}

raw matrix
#

Bump

atomic timber
#

@raw matrix Are you able to fix this ?
as i am facing same issue

raw matrix
minor cove
#

facing the same issue @raw matrix found any clue?

raw matrix
rigid pivot
#

Getting same error 🥲

minor cove
#

im trying to investigate within the package's code, so if someone have any clue, feel free to share with me 🙂

minor cove
#

the issue that I found is that when passing a relation-type field into array-type field - it fails

raw matrix
#

Seems to be solved on my end.