Opened 3 years ago
Closed 3 years ago
#53169 closed defect (bug) (fixed)
Media library upload freezes on multiple uploads from gallery
Reported by: | glendaviesnz | Owned by: | antpb |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Media | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
Related to https://github.com/WordPress/gutenberg/issues/11373, and possibly #50210
If adding a Gallery via Gutenberg, if a file is dropped onto the core media library the first upload succeeds as expected. If a second Gallery is added and another image dropped on the core media library this uploaded freezes and an uncaught exception Uncaught TypeError: Cannot read property 'text' of undefined
in the `wp_includes/js/media-views.js file.
To replicate:
- Go to Posts > Add new.
- Add a title.
- Add a Gallery block.
- Click on Media Library inside the Gallery Block, add two photos.
- Enter the gallery on to the page. The photos appear. All is fine.
- Add another Gallery block.
- Click on Media Library in the Gallery Block again,
- Drag a photo onto the Media library to upload it.
- The upload bar shows 15%-ish done, but then just hangs. Nothing is shown on the far right side. If I click on the photo upload, I get the name of the image, so the Media library is only partially not working.
- Using the x on the upper right to close the Media library and opening it again, just brings up the same frozen upload.
- Drag another photo into the Media Library, upload also hangs.
Change History (10)
This ticket was mentioned in PR #1235 on WordPress/wordpress-develop by glendaviesnz.
3 years ago
#1
- Keywords has-patch added
glendaviesnz commented on PR #1235:
3 years ago
#2
I don't know this part of the code well at all, and couldn't work out why theses values were undefined in some instances, so may be better to trace it further back and prevent this method being hit at all if these values are not defined.
#4
@
3 years ago
Hi there,
Thanks for the great explanation and the patch!
I can reproduce the bug.
After applying the patch, it fixes the issue, and I don't have the error on the console anymore. I can successfully publish a post and view it on the frontend (on trunk, last version of Gutenberg plugin enabled, twentytwenty theme enabled).
Good job 👏 👍
Trac ticket: https://core.trac.wordpress.org/ticket/53169
Related to https://github.com/WordPress/gutenberg/issues/11373, and possibly https://core.trac.wordpress.org/ticket/50210
If adding a Gallery via Gutenberg, if a file is dropped onto the core media library the first upload succeeds as expected. If a second Gallery is added and another image dropped on the core media library this uploaded freezes and an uncaught exception Uncaught TypeError: Cannot read property 'text' of undefined in the `wp_includes/js/media-views.js file.
To replicate: