Describe the Bug.
Occasionally, when a user uploads media through the richtext-lexical upload popover, Payload triggers a 404 and redirects the user to another page. As a result, the user loses all unsaved changes.
This likely occurs because the read replica hasn’t yet synchronized the newly uploaded media item.
When it happens, Payload redirects to: /admin/collections/media?notFound=(id)&limit=10
Using the browser’s Back button only restores the last saved version, not the in-progress version the user was writing.
Reproduction Steps
- Create a new Payload instance that uses pgsql + read replicas.
- Create a new entry in a collection that includes a
richtext-lexical field.
- Use the upload feature to add a new media item (e.g., an image).
- Once the upload completes, the popover closes and you return to the
richtext-lexical editor.
- Every once in a while, Payload will trigger a 404 error and redirect the user to
/admin/collections/media?notFound=(id)&limit=10
Environment Info
payload: 3.51.0
Node: 22.18.0
next: 15.4.6
Describe the Bug.
Occasionally, when a user uploads media through the
richtext-lexicalupload popover, Payload triggers a404and redirects the user to another page. As a result, the user loses all unsaved changes.This likely occurs because the read replica hasn’t yet synchronized the newly uploaded media item.
When it happens, Payload redirects to:
/admin/collections/media?notFound=(id)&limit=10Using the browser’s Back button only restores the last saved version, not the in-progress version the user was writing.
Reproduction Steps
richtext-lexicalfield.richtext-lexicaleditor./admin/collections/media?notFound=(id)&limit=10Environment Info