Gutenberg: Gallery Block Uploads Keep Freezing

Created on 24 Aug 2020  路  4Comments  路  Source: WordPress/gutenberg

Describe the bug
When creating multiple Gallery Blocks to a page, uploads to the Media Gallery will freeze when uploading via selecting Media Library > Upload after doing this more than once.

I've tested on fresh installs of WP Engine, WP Sandbox, and WordPress.com. On the wp.com it provides the error "Updating failed. User cannot access this private blog.".

To reproduce
Steps to reproduce the behavior:

  1. Create a fresh install of WordPress
  2. Create a new Post
  3. Add a Gallery Block and select Media Library > Upload Files
  4. Upload one or more images, and follow the prompts to create the Gallery.
  5. Repeat steps 3 and 4 one or two more times to see the error.

Expected behavior
Images should upload without issue and they should be able to repeat steps 3-4 as many times as needed.

Screenshots
image
Uploading failed on wpsandbox.pro

image
Uploading failed on wp.com

https://www.loom.com/share/129e1208503b4c4390edaef3afdd8e6b
Video showing issue in action

Editor version (please complete the following information):

  • WordPress version: 5.5
  • Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? default
  • If the Gutenberg plugin is installed, which version is it?

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 84.0.4147.125
Needs Dev Needs Technical Feedback [Block] Gallery [Type] Bug

Most helpful comment

Console shows Uncaught TypeError: Cannot read property 'text' of undefined (media-views.js:5585), leading to me to this line.

It looks like this.$index only gets properly set for the first gallery instance (or upload instance?). The underlying code hasn't changed in eight years which leads me to assume the media modal doesn't get set up properly?

Not sure who Gutenberg's resident Media expert is, @mcsf or @draganescu know maybe?

All 4 comments

@Kpudlo Thanks so much for reporting this. I was able to replicate this as well with 5.5.1 and found the upload flow to be very odd as well. Here's a video for good measure showing the upload just "hangs": https://cloudup.com/ccY7nYSqiJj I labeled this appropriately so devs can jump in.

Can confirm this does not work with Gutenberg installed in version 8.9.1 either using WordPress 5.5.1 in a new test site with TwentyTwenty and no other plugins active.

Console shows Uncaught TypeError: Cannot read property 'text' of undefined (media-views.js:5585), leading to me to this line.

It looks like this.$index only gets properly set for the first gallery instance (or upload instance?). The underlying code hasn't changed in eight years which leads me to assume the media modal doesn't get set up properly?

Not sure who Gutenberg's resident Media expert is, @mcsf or @draganescu know maybe?

It looks like this.$index only gets properly [鈥

Thanks for looking into this.

Not sure who Gutenberg's resident Media expert is [鈥

Maybe @antpb or @johnbillion can help?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maddisondesigns picture maddisondesigns  路  3Comments

wpalchemist picture wpalchemist  路  3Comments

aaronjorbin picture aaronjorbin  路  3Comments

nylen picture nylen  路  3Comments

spocke picture spocke  路  3Comments