Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Lexical Upload field crashes when using external file storage

default discord avatar
augdustlast year

Hey all!



I recently got my external cloud file storage set up, but that made my Collection with a Lexical Rich Text field crash the collection.



The error I get whenever I try to load the collection is as follows:



[08:51:55] ERROR (payload): TypeError: Cannot read properties of undefined (reading 'payload')
    at promise (/project-dir/node_modules/@payloadcms/richtext-lexical/src/field/features/Upload/afterReadPromise.ts:25:30)
    at forEach (/project-dir/node_modules/@payloadcms/richtext-lexical/src/populate/richTextRelationshipPromise.ts:45:16)
    at Array.forEach (<anonymous>)
    at recurseRichText (/project-dir/node_modules/@payloadcms/richtext-lexical/src/populate/richTextRelationshipPromise.ts:41:14)
    at richTextRelationshipPromise (/project-dir/node_modules/@payloadcms/richtext-lexical/src/populate/richTextRelationshipPromise.ts:90:3)
    at Object.afterReadPromise (/project-dir/node_modules/@payloadcms/richtext-lexical/src/index.ts:70:43)
    at promise (/project-dir/node_modules/payload/src/fields/hooks/afterRead/promise.ts:157:42)
    at forEach (/project-dir/node_modules/payload/src/fields/hooks/afterRead/traverseFields.ts:45:14)
    at Array.forEach (<anonymous>)
    at traverseFields (/project-dir/node_modules/payload/src/fields/hooks/afterRead/traverseFields.ts:43:10)

The collection page loads, but it just shows an infinite skeleton loader for the collection items.



Running Payload 2.0.14



tried disabling the cloudstorage-plugin, and I'm still receiving the error from my previous message

:shrugok:

fixed it by updating the lexical-plugin, cloud-storage-plugin and deleting 'node_modules' and doing a fresh 'yarn install' :)

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.