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:
- Log in using [email protected]
- Click Users collection
- Click Create New
- 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
}