Rich Text Editor media disappears when canceling/closing upload modal (Prod only)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- nextjs, react, typescript
Research direction
Start with the reproduction in src/collections/Posts.ts and run the production setup with pnpm build, pnpm docker:build, and pnpm docker:run. Trace the Rich Text Editor upload modal when it is closed without selecting media, comparing production behavior with local mode. Done means existing media remains visible after closing the modal, including in the intermittent production-only case.
Written by the indexing model from the issue text.
Description
Describe the Bug
Hi, I’m facing a strange issue with the Payload CMS Rich Text Editor upload feature.
Context:
- The RTE upload feature uses images from my
mediacollection. - This issue only happens in staging/production mode.
Expected behavior:
- Closing the upload modal without selecting media should not affect already uploaded media in the editor.
Observed behavior:
- Existing media temporarily disappears from the RTE until another media item is selected.
Additional notes:
- The issue is environment-specific (staging/production only).
- No issue occurs locally.
- also please note that this issue is not consistent
Link to the code that reproduces this issue
https://github.com/tpahore/payload-test/blob/main/src/collections/Posts.ts
Reproduction Steps
Issue steps:
- Open the Rich Text Editor.
- Click “Upload”.
- Select an existing image from the media collection.
- Click “Upload” again.
- This time, click the close/cross button instead of selecting an image.
- After closing the modal, all previously uploaded media disappears from the editor.
- If I click “Upload” again and select another image, all previously disappeared media appears again along with the newly selected image.
https://github.com/user-attachments/assets/b6f39e33-100e-48cd-aaac-9414a26b746c
Which area(s) are affected?
area: core
Environment Info
Payload version: 3.84.1
please run project in production mode
pnpm build
pnpm docker:build
pnpm docker:run
- Dominant language
- TypeScript
- Stars
- 44.8k
- Forks
- 4.2k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 53
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from payloadcms/payload
-
area: ui Bug status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
payloadcms/payload#18215 · 1 comment ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
payloadcms/payload#18163 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
payloadcms/payload#18161 ·
-
area: core Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
payloadcms/payload#18072 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
payloadcms/payload#18067 · 1 comment ·
All issues in payloadcms/payload
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·