Repository navigation
Open
Labels
BugPayload OSSarea: coreCore Payload functionalityarea: uiRelated to the admin panel.db: mongodb@payloadcms/db-mongodbstatus: needs-triagePossible bug which hasn't been reproduced yetv3
Description
Describe the Bug
When trying to use "copy to locale" on any global i get the following error:
err: {
"type": "TypeError",
"message": "Cannot read properties of undefined (reading 'config')",
"stack":
TypeError: Cannot read properties of undefined (reading 'config')
at copyDataFromLocale (C:\git\payload-test\.next\dev\server\chunks\ssr\node_modules_@payloadcms_ui_dist_06ysd6i._.js:4679:53)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async copyDataFromLocaleHandler (C:\git\payload-test\.next\dev\server\chunks\ssr\node_modules_@payloadcms_ui_dist_06ysd6i._.js:4622:16)
at async executeActionAndPrepareForRender (C:\git\payload-test\node_modules\next\dist\compiled\next-server\app-page-turbo.runtime.dev.js:64:5248)
at async C:\git\payload-test\node_modules\next\dist\compiled\next-server\app-page-turbo.runtime.dev.js:64:1986
at async handleAction (C:\git\payload-test\node_modules\next\dist\compiled\next-server\app-page-turbo.runtime.dev.js:62:25386)
at async renderToHTMLOrFlightImpl (C:\git\payload-test\node_modules\next\dist\compiled\next-server\app-page-turbo.runtime.dev.js:69:55695)
at async doRender (C:\git\payload-test\.next\dev\server\chunks\ssr\node_modules_117v_f-._.js:3638:28)
at async AppPageRouteModule.handleResponse (C:\git\payload-test\node_modules\next\dist\compiled\next-server\app-page-turbo.runtime.dev.js:71:66429)
at async handleResponse (C:\git\payload-test\.next\dev\server\chunks\ssr\node_modules_117v_f-._.js:3949:32)
at async Module.handler (C:\git\payload-test\.next\dev\server\chunks\ssr\node_modules_117v_f-._.js:4355:20)
at async DevServer.renderToResponseWithComponentsImpl (C:\git\payload-test\node_modules\next\dist\server\base-server.js:1462:9)
at async DevServer.renderPageComponent (C:\git\payload-test\node_modules\next\dist\server\base-server.js:1514:24)
at async DevServer.renderToResponseImpl (C:\git\payload-test\node_modules\next\dist\server\base-server.js:1564:32)
at async DevServer.pipeImpl (C:\git\payload-test\node_modules\next\dist\server\base-server.js:1044:25)
at async NextNodeServer.handleCatchallRenderRequest (C:\git\payload-test\node_modules\next\dist\server\next-server.js:338:17)
at async DevServer.handleRequestImpl (C:\git\payload-test\node_modules\next\dist\server\base-server.js:935:17)
at async C:\git\payload-test\node_modules\next\dist\server\dev\next-dev-server.js:394:20
at async Span.traceAsyncFn (C:\git\payload-test\node_modules\next\dist\trace\trace.js:164:20)
at async DevServer.handleRequest (C:\git\payload-test\node_modules\next\dist\server\dev\next-dev-server.js:390:24)
at async invokeRender (C:\git\payload-test\node_modules\next\dist\server\lib\router-server.js:266:21)
at async handleRequest (C:\git\payload-test\node_modules\next\dist\server\lib\router-server.js:465:24)
at async requestHandlerImpl (C:\git\payload-test\node_modules\next\dist\server\lib\router-server.js:514:13)
at async Server.requestListener (C:\git\payload-test\node_modules\next\dist\server\lib\start-server.js:225:13)
}
⨯ TypeError: Cannot read properties of undefined (reading 'config')
at ignore-listed frames {
digest: '2467349392'
}
POST /admin/globals/header?locale=en 500 in 406ms (next.js: 4ms, application-code: 403ms)
└─ ƒ <inline action>({"args":{"fromLocale":"en","globalSlug":"header","overrideData":true,"...":"1 item not stringified"},"name":"copy-data-from-locale"}) in 28ms src/app/(payload)/layout.tsx
Looks like it might be the same bug or similar to this: #16455
Link to the code that reproduces this issue
Reproduction Steps
The linked repository can be used to reproduce the error using a MongoDB database.
Use the global Header to test it.
Which area(s) are affected?
db: mongodb, area: ui, area: core
Environment Info
Binaries:
Node: 26.2.0
npm: N/A
Yarn: N/A
pnpm: N/A
Relevant Packages:
payload: 3.84.1
next: 16.2.6
@payloadcms/db-mongodb: 3.84.1
@payloadcms/email-nodemailer: 3.84.1
@payloadcms/graphql: 3.84.1
@payloadcms/next/utilities: 3.84.1
@payloadcms/payload-cloud: 3.84.1
@payloadcms/translations: 3.84.1
@payloadcms/ui/shared: 3.84.1
react: 19.2.6
react-dom: 19.2.6
Operating System:
Platform: win32
Arch: x64
Version: Windows 10 IoT Enterprise LTSC 2021
Available memory (MB): 65461
Available CPU cores: 24
Reacted by Valentin Chevalier
Metadata
Metadata
Assignees
Labels
BugPayload OSSarea: coreCore Payload functionalityarea: uiRelated to the admin panel.db: mongodb@payloadcms/db-mongodbstatus: needs-triagePossible bug which hasn't been reproduced yetv3
Activity
sebastijandumancic commentedon Jun 2, 2026
I have the same issue right now Payload 3.84.1
christophz commentedon Oct 8, 2026
Also affected on 3.90.2 with
@payloadcms/db-postgres(Next 16.4.0, Node 24), so this is not specific to MongoDB.Cause, as far as I can see:
copyDataFromLocalereadsglobals[globalSlug].config.fieldsfromreq.payload(packages/ui/src/utilities/copyDataFromLocale.ts, around L300 on v3.90.2). Butpayload.globalsis{ config: SanitizedGlobalConfig[] }, not a map by slug. Thusglobals[globalSlug]isundefined, and the action throwsTypeError: Cannot read properties of undefined (reading 'config')beforeupdateGlobal. Nothing is saved.The same lookup is in
fetchVersionsof@payloadcms/next(views/Version):req.payload.globals[globalSlug]?.config. There the optional chaining hides the error, anddraftsEnabledis always false for globals in the version view.#17072 (against
3.x) fixes both places. #16334 fixes the first one onmain. Both are still open.Environment (
payload info):Minimal config (any localized global; drafts are not necessary):
Steps: open the global, fill in "Title", then "…" → "Copy to locale" → from
entode→ "Copy". The toast shows the error, and the server log has the stack. The same fields in a collection work.