WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 20 months ago

#39824 assigned defect (bug)

Gallery doesn't show images being uploaded

Reported by: gonom9 Owned by: adamsilverstein
Milestone: Future Release Priority: normal
Severity: normal Version: 4.0
Component: Gallery Keywords: has-patch reporter-feedback 2nd-opinion
Focuses: javascript Cc:
PR Number:

Description

When you insert a gallery with images being uploaded in Edit Post page, the gallery doesn't show the images.

How to Reproduce

  1. Open Edit Post page.
  2. Insert a gallery with one uploaded image.
  3. Select the gallery in tinyMCE then click on Edit.
  4. Upload a big image file and/or slow down the internet to buy time for the following actions.
  5. Choose Edit Gallery tab then click on Update Gallery button while the big image is uploading.
  6. The gallery shows an empty element instead of the image.
  7. If you edit the gallery and open Edit Gallery tab after the image uploaded, you'll see it has gone.

Attachments (2)

39824.diff (3.0 KB) - added by adamsilverstein 3 years ago.
39824.2.diff (2.8 KB) - added by adamsilverstein 20 months ago.

Download all attachments as: .zip

Change History (7)

#1 @adamsilverstein
3 years ago

@gonom9 thanks for the bug report.

I verified this issue and captured a screencast to demonstrate the issue: https://cl.ly/3F0s1y0j021h

I have a potential solution I will upload shortly that disables the insert gallery button when you are in the process of uploading videos. I'm not certain this is the best approach, but it does prevent you from creating the broken condition you noted.

#2 @adamsilverstein
3 years ago

  • Focuses javascript added
  • Keywords has-patch reporter-feedback 2nd-opinion added
  • Version changed from 4.7.2 to 4.0

In 39824.diff:

Media: Disable the Insert/Update Gallery button while uploads are in progress.

Is there a better approach to resolving this issue?

@gonom9 can you give this a test and see if it resolves the issue for you?

#3 @adamsilverstein
3 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Owner set to adamsilverstein
  • Status changed from new to assigned

#4 @adamsilverstein
20 months ago

39824.2.diff: refresh patch against trunk.

Last edited 20 months ago by adamsilverstein (previous) (diff)

#5 @adamsilverstein
20 months ago

Testing the patch, it is not working as expected. during the upload process models are note getting the 'uploading' attribute set to true (instead it is undefined, while for uploaded posts it is false). This seems like a regression and will take some more digging to see why this is happening.

Note: See TracTickets for help on using tickets.