Open
Description
Describe the Bug
When a value containing a key "target" is used in a JSON field it will not be saved.
Link to the code that reproduces this issue
https://github.com/anatolykopyl/payload-target-repro
Reproduction Steps
- Either try to create a user or open a user in the admin panel. For example
/admin/collections/users/1
. - In the field
test-field
paste this:{"target": "whatever"}
. - Save the document and reload the page.
Result: the test-field
value will be in the state it was before modification.
Which area(s) are affected? (Select all that apply)
area: core
Environment Info
> [email protected] payload /Users/anatolykopyl/Projects/payload-target-repro
> cross-env NODE_OPTIONS=--no-deprecation payload info
Binaries:
Node: 20.10.0
npm: 10.2.3
Yarn: 1.22.19
pnpm: 10.6.1
Relevant Packages:
payload: 3.43.0
next: 15.3.0
@payloadcms/email-nodemailer: 3.43.0
@payloadcms/graphql: 3.43.0
@payloadcms/next/utilities: 3.43.0
@payloadcms/payload-cloud: 3.43.0
@payloadcms/richtext-lexical: 3.43.0
@payloadcms/translations: 3.43.0
@payloadcms/ui/shared: 3.43.0
react: 19.1.0
react-dom: 19.1.0
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:48:46 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8103
Available memory (MB): 16384
Available CPU cores: 8