Skip to content

undefined blockReferences #13641

@whatisloves

Description

@whatisloves

Describe the Bug

I have 3 layers of blocks for Page collection with multi-tenancy plugin isolation on collection. Block inserted in a Page is TabbedContentBlock, which is a non-lexical block which contains two TextEditorBlocks each of which have a richText field. Each TextEditor's RTE has own lexical blocks that i define through jsxConverters.

The front-end page /federation renders both lexical sub-blocks perfectly and everything works as intended. But at the same time the first TextEditor gives an error Cannot read properties of undefined (reading 'blockReferences') in admin GUI

Only the combination of two TextEditors with such config causes the error to appear. If i have only one TextEditor block then there is no error.

I seed the contents for these blocks and i get the error. If i enter the same content myself through admin GUI, I get the same error.

Initially my project didn't even use any mention of blockReferences - i got the same error. Then i read docs and moved all lexical blocks to global config and still got the error. Then i implemented a textbook blockReference approach and i still get the error. Weird is that front-end works and the admin GUI bugs out.

Image Image Image

i use payloadcms with multi-tenancy plugin

Link to the code that reproduces this issue

https://github.com/whatisloves/payloadcms-bug

Reproduction Steps

Clone my public error which has the setup to reproduce the bug.

  1. npm install
  2. cp .env.example .env (and fill the DB info)
  3. npm run generate:types
  4. npm run generate:importmap
  5. npm run relaunch (which cleans the DB, then seeds it with the problematic data, and then launches dev server on port 3003)

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

area: core

Environment Info

pnpm payload info
! The local project doesn't define a 'packageManager' field. Corepack will now add one referencing [email protected]+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b.
! For more details about this field, consult the documentation at https://nodejs.org/api/packages.html#packagemanager


> [email protected] payload /Users/whatisloves/payloadcms-bug
> cross-env NODE_OPTIONS=--no-deprecation payload info

This project is configured to use pnpm because /Users/whatisloves/payloadcms-bug/package.json has a "packageManager" field

Binaries:
  Node: 23.10.0
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.15.0
Relevant Packages:
  payload: 3.54.0
  next: 15.5.2
  @payloadcms/db-postgres: 3.54.0
  @payloadcms/email-nodemailer: 3.54.0
  @payloadcms/graphql: 3.54.0
  @payloadcms/live-preview: 3.54.0
  @payloadcms/live-preview-react: 3.54.0
  @payloadcms/next/utilities: 3.54.0
  @payloadcms/payload-cloud: 3.54.0
  @payloadcms/plugin-multi-tenant: 3.54.0
  @payloadcms/richtext-lexical: 3.54.0
  @payloadcms/translations: 3.54.0
  @payloadcms/ui/shared: 3.54.0
  react: 19.1.1
  react-dom: 19.1.1
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): 8192
  Available CPU cores: 8

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions