Image upload after gallery upload fails #13486
Labels
[Block] Gallery
Affects the Gallery Block - used to display groups of images
[Feature] Media
Anything that impacts the experience of managing media
[Type] Bug
An existing feature does not function as intended
Describe the bug
If an editor inserts a gallery, uploads an image via media library, inserts and image and tries to upload another image via media library the upload gets stuck and a JS error occurs:
media-views.min.js?ver=5.0.3:2 Uncaught TypeError: Cannot read property 'text' of undefined at n.info (media-views.min.js?ver=5.0.3:2) at _ (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at m (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at f (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at n.u.trigger (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at n._onModelEvent (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at _ (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at m (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at f (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29) at n.u.trigger (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,underscore,wp-util,jquery-ui-core,backbone,wp-api-request,jquery-ui-widget,jquery-ui-mouse,jque&load[]=ry-ui-sortable,postbox,wp-backbone,media-models,moxiejs,plupload,wp-plupload&ver=5.0.3:29)
Reloading the editor afterwards solves the problem and allows additional uploads.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
User should be able to upload images after creating a gallery
Screenshots

Step1: Galery upload
Step2: Image upload

Step3: error in media library

Desktop (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: