Opened 7 weeks ago
Last modified 7 weeks ago
#62902 new defect (bug)
Description of featured image is being deleted
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 6.7.1 |
Component: | Media | Keywords: | has-screenshots has-testing-info has-patch |
Focuses: | Cc: |
Description
The description of featured image is being deleted while going to replace from post editor page.
How to reproduce:
- Upload a image with setting values only for "Alternative Text" & "Description" fields. https://i.imgur.com/DGjZBzi.png
- Create a post & set featured image which uploaded.
- Save as draft or publish the post.
- Reload the post editor page & try to replace feature image, then you will notice that the description field is empty.
https://i.imgur.com/gHUBWYY.png
https://i.imgur.com/bEWi1JU.png
My Environment:
PHP: 8.2.4
Wordpress version :6.7.1
Theme: Twenty Twenty-Five
And no plugins were installed.
Attachments (2)
Change History (7)
#2
@
7 weeks ago
- Keywords has-screenshots added
Reproduction Report
Description
This report validates whether the issue can be reproduced.
Environment
- WordPress: 6.7.1
- PHP: 8.2.27
- Server: nginx/1.27.3
- Database: mysqli (Server: 8.0.41 / Client: mysqlnd 8.2.27)
- Browser: Chrome 132.0.0.0
- OS: macOS
- Theme: Twenty Twenty-Five 1.0
- MU Plugins: None activated
- Plugins:
- Test Reports 1.2.0
Actual Results
- ✅ Error condition occurs (reproduced).
Additional Notes
I am also able to reproduce this in the current trunk.
Supplemental Artifacts
First Replace click:
#3
@
7 weeks ago
Hi @sukhendu2002,
Please, also keep empty the title of image.
https://www.awesomescreenshot.com/video/36213615?key=3c6963c4836fb8c88ad9267c4f251250
This ticket was mentioned in PR #8256 on WordPress/wordpress-develop by @yogeshbhutkar.
7 weeks ago
#5
- Keywords has-patch added
Trac ticket: #62902
### Description
This code bails out early when the updated value matches the DOM, but the model starts with defaults (e.g., an empty title), and AJAX delays can leave values uninitialized. This can block re-renders, especially when the data becomes available post the AJAX call.
While the early return prevents unnecessary updates, it shouldn't apply when multiple changes occur simultaneously during initialization. Instead, bailing out only when a single change occurs—and it matches the DOM—ensures proper hydration and fixes the bug.
### Screencast
https://github.com/user-attachments/assets/5f3b33c3-cdd7-4e26-adef-aaf8d263ac02
Hello @jogashst,
I tried to reproduce your issue with saving the post as a draft and publishing, but it seems to work perfectly. In latest clean setup with Twenty Twenty-Five and no plugins were installed.