Opened 12 years ago
Last modified 4 months ago
#27139 new defect (bug)
Image caption disappears if images are rearranged immediately after adding the caption.
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 3.5 |
| Component: | Media | Keywords: | has-patch has-test-info |
| Focuses: | Cc: |
Description
Steps to reproduce (screencast here: http://youtu.be/MF2SEn_lMeQ):
- While editing a post, open the Add Media dialog.
- Upload (or select) two images and choose "Create Gallery."
- Click "Create New Gallery".
- Add a caption to the first image in the text field underneath the image preview in the main "Edit Gallery" area.
- Drag the second image so that it is reordered in front of the first image.
What I expected:
The images would be reordered and the image captions would not be changed.
What actually happened:
The images were reordered, but the image caption I had just entered reverted to its previous state.
Clicking in any other text field before reordering images seems to "cement" the caption, but you can click on multiple images before dragging an image, and the caption will still revert.
Attachments (3)
Change History (20)
#2
follow-up:
↓ 3
@
12 years ago
I'd be curious to know if this is reproducible in 3.5, or if it regressed at some point since then.
#3
in reply to:
↑ 2
@
12 years ago
Replying to nacin:
I'd be curious to know if this is reproducible in 3.5, or if it regressed at some point since then.
Yes, confirmed just now that it is reproducible in 3.5 as well.
#4
@
12 years ago
This appears to be happening because the collection reset event is being triggered prior to the caption:update event. Disabling the reset fixes the issue but it's documentation alludes to the reset being needed to ensure other collections sync.
#8
@
5 years ago
- Keywords needs-testing has-patch removed
This bug is still present in 5.6.1 and is still very frustrating when encountered. The latest patch doesn't work, so I'll be trying to update it. I haven't worked on any of the media JS before, so it might be slow-going.
@
5 years ago
Fixes the issue in version 5.6.1 by triggering the focused caption input's change event before a reorder happens.
#9
@
5 years ago
- Keywords has-patch needs-testing added
I've added a patch that is compatible with WordPress 5.6.1.
#10
@
5 months ago
- Keywords close reporter-feedback added; needs-testing removed
Reproduction Report
Description
❌ This report can't validate that the issue can be reproduced.
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.29.0
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Chrome 137.0.0.0
- OS: Windows 10/11
- Theme: Twenty Fifteen 4.0
- MU Plugins: None activated
- Plugins:
- Classic Editor 1.6.7
- Test Reports 1.2.0
Reproduction Instructions
- Doing the exact instructions in OP, attach my screencast in supplemental artifacts
Actual Results
- ❌ Error condition doesn't occur
Additional Notes
- This is 11 years old, but it seems it was refreshed not long ago (only 4 years), despite this I can't reproduce it. Expecting that the reporter, give it a check and tell me what I'm doing wrong, because I'm doing the exact same as the screencast provided there and what could be going wrong (luckily it was uploaded to YT and not to a random host that could be offline by now!). cc @cfinke
- Otherwise, simply setting this for
close,worksformeif we don't get an answer over time.
Supplemental Artifacts
Sample screencast:
https://f003.backblazeb2.com/file/wordpress-videos/wp-videos/2025/06/27139.1.mp4
#11
@
5 months ago
I can still reproduce it in the latest nightly 6.9 build using Firefox and Safari on Mac OS 15.5, but I agree that the bug no longer exists (or maybe never did exist) in Chrome.
#13
@
5 months ago
- Keywords needs-testing removed
Test Report
Description
✅ This report validates that the indicated patch works as expected.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/27139/27139.3.patch
Environment
- WordPress: 6.9-alpha-60093-src
- PHP: 8.2.28
- Server: nginx/1.29.0
- Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
- Browser: Firefox 140.0
- OS: Windows 10/11
- Theme: Twenty Twenty-One 2.5
- MU Plugins: None activated
- Plugins:
- Classic Editor 1.6.7
- Test Reports 1.2.0
Bug Reproduction
- Again following OP instructions
- 🐞 As commented here the problem doesn't affect Chrome, so I tried with Firefox, and it has been reproduced
Additional Information
- My question is, why is not affecting Chrome?
Actual Results
- ✅ Issue resolved with patch.
This ticket was mentioned in Slack in #core-test by sirlouen. View the logs.
4 months ago
#15
@
4 months ago
Test Report
This report validates that the indicated patch addresses the issue.
Patch tested: https://core.trac.wordpress.org/attachment/ticket/27139/27139.3.patch
Environment
- OS: Windows 11 Home
- Web Server: Nginx
- PHP: 8.2.27
- WordPress: 6.8-1
- Browser: Chrome Version 138.0.7204.101 (Official Build) (64-bit)
- Theme: Twenty Twenty-Five
- Active Plugins:
- Gutenberg 13.2.0
- Classic Editor
- WordPress Beta Tester 3.2.1
Actual Results
- ✅ Issue resolved with patch.
Additional Notes
- Any additional details worth mention.
Supplemental Artifacts
Add Inline: https://www.awesomescreenshot.com/video/42012737?key=8a41a55cfa3f43a781ce5ae2a0da81a1)
Oh, browser details: The screencast and described behavior are in Firefox 27 on Mac OS X 10.9.1.
In Chrome 32 on Mac OS X 10.9.1, the behavior is a little different: If you drag and drop the image that you just added the caption to, the caption is not lost. However, if you drag and drop another image, even if it doesn't change the location of the captioned image, the caption is lost.