payloadcms/payload

element creation via plus in admin dashboard does not work

Opened this issue · 0 comments

Describe the Bug

If a field within a Block relates to several collections, then the creation of a collection instance from that field via "+" is broken in the admin dashboard for all collections that are not the first in the relationTo-list.

Link to the code that reproduces this issue

https://github.com/vivien-lorenz/payloadcms-creation-via-plus-issue-reproduction

Reproduction Steps

Create a demo project via npx create-payload-app my-project -t website and modify the FormBlock as follows:

Image

Then go to the admin dashboard, create a new page with a Form Block in the Content tab. Hit "+" to create a new category:

Image

You will receive a cryptic ID displayed in the Form Block:

Image

The reason is a faulty JSON:

Image

Choosing the category instance from the dropdown ...

Image

... works like a charm ...

Image

... since the JSON is correct:

Image

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

db-mongodb

Environment Info

> payload-demo@1.0.0 payload
> cross-env NODE_OPTIONS=--no-deprecation payload info


Binaries:
  Node: 23.3.0
  npm: 10.9.0
  Yarn: 1.22.22
  pnpm: N/A
Relevant Packages:
  payload: 3.56.0
  next: 15.4.4
  @payloadcms/db-mongodb: 3.56.0
  @payloadcms/email-nodemailer: 3.56.0
  @payloadcms/graphql: 3.56.0
  @payloadcms/live-preview: 3.56.0
  @payloadcms/live-preview-react: 3.56.0
  @payloadcms/next/utilities: 3.56.0
  @payloadcms/payload-cloud: 3.56.0
  @payloadcms/plugin-form-builder: 3.56.0
  @payloadcms/plugin-nested-docs: 3.56.0
  @payloadcms/plugin-redirects: 3.56.0
  @payloadcms/plugin-search: 3.56.0
  @payloadcms/plugin-seo: 3.56.0
  @payloadcms/richtext-lexical: 3.56.0
  @payloadcms/translations: 3.56.0
  @payloadcms/ui/shared: 3.56.0
  react: 19.1.0
  react-dom: 19.1.0
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Debian 6.12.43-1~bpo12+1 (2025-09-06)
  Available memory (MB): 59920
  Available CPU cores: 16