payload
payload copied to clipboard
Lexical BlockFeature/UploadFeature: only media ID is retrieved if nested
Link to reproduction
No response
Describe the Bug
As soon as a media is attached within a nested lexical, only ID thereof is retrieved, despite setting depth
query parameter to a very high value.
To Reproduce
- Attach a media to lexical either via Upload feature of by using a block with an image e.g. `type: 'upload', relationTo: 'media'
- Verify
depth
is set correctly and the whole image object is fetched as expected - Now create a block featuring a nested rich text (I'm using an Array where a rich text is only field of an array item)
- Attach media to a nested lexical as described in pt.1
- Only media ID is being retrieved for an image field
Payload Version
2.0.14
Adapters and Plugins
richtext-lexical, db-mongodb, bundler-webpack
Looks like this has been fixed on master. At least, I can't reproduce it. Another PR might have fixed it coincidentally.
You can expect the fix in v0.1.18 or higher of the lexical plugin! If there's still an issue in that version, please do open a new issue with a reproduction.
@AlessioGr I am having this issue still. When fetching a collection that contains blocks, and those blocks contain rich text, which in turn contains more blocks, image relations are either not populated. When increasing the depth
param, the image data is included but now the rich text content is not there.
@stefvw93 I'm dealing with this as well. What's interesting though is that I only have it on dev and not on production
Okay the issue is now present on both local and production. On lexical with nested blocks, media just returns an ID. Are there any fixes for this? @AlessioGr @stefvw93 @pooledge
Okay the issue is now present on both local and production. On lexical with nested blocks, media just returns an ID. Are there any fixes for this? @AlessioGr @stefvw93 @pooledge
For now I switched over to REST API
I have tried to reproduce it again, but am sadly unable to. Due to that, I'll have to ask you to open up a new issue with a reproduction, following our reproduction guide.
If you can do that, and reproduce it with @payloadms/richtext-lexical
3.0.0-beta.36 or higher, I'm happy to look into this again ASAP :)