payload
payload copied to clipboard
fix (live-preview): populates Lexical - blocks and inline blocks relations are not populated
Link to reproduction
No response
Environment Info
Node.js v22.8.0
Binaries:
Node: 22.8.0
npm: 10.8.2
Yarn: N/A
pnpm: 9.4.0
Relevant Packages:
payload: 3.0.0-beta.104
next: 15.0.0-canary.104
@payloadcms/db-mongodb: 3.0.0-beta.104
@payloadcms/graphql: 3.0.0-beta.104
@payloadcms/live-preview: 3.0.0-beta.104
@payloadcms/next/utilities: 3.0.0-beta.104
@payloadcms/plugin-cloud-storage: 3.0.0-beta.104
@payloadcms/richtext-lexical: 3.0.0-beta.104
@payloadcms/storage-s3: 3.0.0-beta.104
@payloadcms/translations: 3.0.0-beta.104
@payloadcms/ui/shared: 3.0.0-beta.104
react: 19.0.0-rc-06d0b89e-20240801
react-dom: 19.0.0-rc-06d0b89e-20240801
Operating System:
Platform: linux
Arch: x64
Version: #44-Ubuntu SMP PREEMPT_DYNAMIC Tue Aug 13 13:35:26 UTC 2024
Available memory (MB): 31817
Available CPU cores: 8
Describe the Bug
When author enter inline blocks or block if the block has relation field like upload or any other relation. The data in the live preview message does not contain the document of the relation. For now there's a need to call API for each relation and sometimes the live preview is not responding
Reproduction Steps
Clone:
https://github.com/tsemachh/payload/tree/bug(live-preview)-LexicalRelationsNotExpanded
pnpm dev live-preview
Debug on :
webpack://_N_E/packages/live-preview/src/traverseRichText.ts?7b26
Add to Test tab to the lexical content media block and see that it doesn't expand it regardless the depth provided
Example of debug:
Adapters and Plugins
No response