Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image upload after gallery upload fails #13486

Closed
p2er opened this issue Jan 24, 2019 · 3 comments
Closed

Image upload after gallery upload fails #13486

p2er opened this issue Jan 24, 2019 · 3 comments
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

Comments

@p2er
Copy link

p2er commented Jan 24, 2019

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:

  1. Go to post edit page
  2. Click on add block and select gallery
  3. Click on media library
  4. Drag image into media library to upload image
  5. Create gallery
  6. Add image block
  7. Click on media library
  8. Drag image into media library to upload image
  9. Expected: upload to complete. Actual: upload fails due to JS error

Expected behavior
User should be able to upload images after creating a gallery

Screenshots
Step1: Galery upload
step1_gallery

Step2: Image upload
step2_image

Step3: error in media library
step3_error

Desktop (please complete the following information):

  • OS: macOS 10.14.2
  • Browser Chrome
  • Version 71.0.3578.98

Additional context

  • Gutenberg Version: 4.9.0
  • Wordpress Version: 5.0.3
@youknowriad youknowriad added [Type] Bug An existing feature does not function as intended [Feature] Media Anything that impacts the experience of managing media Needs Testing Needs further testing to be confirmed. [Block] Gallery Affects the Gallery Block - used to display groups of images labels Jan 25, 2019
@SamReciter
Copy link

SamReciter commented Feb 23, 2019

Confirmed on Wordpress ver. 5.1
Same error on same process.
OS: Win10
Browser: Chrome

@jorgefilipecosta jorgefilipecosta removed the Needs Testing Needs further testing to be confirmed. label Jun 6, 2019
@jorgefilipecosta
Copy link
Member

I was also able to reproduce this problem on Chrome in MacOS the error I got was the same:

Uncaught TypeError: Cannot read property 'text' of undefined
    at N.d.info (media-views.js?ver=5.3-alpha-20190604.185652:5150)

@youknowriad
Copy link
Contributor

Duplicate of #11373

@youknowriad youknowriad marked this as a duplicate of #11373 Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants