Make WordPress Core

Opened 7 years ago

Last modified 3 years ago

#39824 assigned defect (bug)

Gallery doesn't show images being uploaded

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


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 7 years ago.
39824.2.diff (2.8 KB) - added by adamsilverstein 6 years ago.

Download all attachments as: .zip

Change History (11)

#1 @adamsilverstein
7 years ago

@gonom9 thanks for the bug report.

I verified this issue and captured a screencast to demonstrate the issue:

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
7 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
7 years ago

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

#4 @adamsilverstein
6 years ago

39824.2.diff: refresh patch against trunk.

Last edited 6 years ago by adamsilverstein (previous) (diff)

#5 @adamsilverstein
6 years 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.

#6 @adamsilverstein
4 years ago

  • Milestone changed from Future Release to 5.4

I still see a similar issue in WP 5.3 with the block editor: if you create a gallery, you can drop images onto the modal and then close it before uploads complete. Reopening media and editing the Gallery will show the upload progress, and update the gallery with completed items. Screencast reproducing issue in 5.3:

The original solution of disabling the "Insert/Update Gallery" button while uploads are in progress still feels right and would be a nice improvement. I'm going to revisit this for 5.4.

#7 @audrasjb
4 years ago

  • Milestone changed from 5.4 to Future Release

Hi there,

With Beta 3 approaching, we'll need a decision and a commit action very soon.
For Component maintainers: if you don't feel the current patch is ready to land in WP 5.4 in the next few day, it's could be better to move it to 5.5. We're leaving it in the milestone for now.

#8 @adamsilverstein
3 years ago

  • Milestone changed from Future Release to 5.7

#9 @lukecarbis
3 years ago

  • Milestone changed from 5.7 to Future Release

As per @audrasjb's comment above, we're in beta 3 of 5.7 now. Moving to Future Release.

Note: See TracTickets for help on using tickets.