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

Media library can only be opened once - upload freezes on second opening #11373

Closed
rowroll opened this issue Nov 1, 2018 · 17 comments
Closed
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

@rowroll
Copy link

rowroll commented Nov 1, 2018

I keep having to refresh the whole editor page when I open the media library upload for the second time. I can see the upload for a new photo start, but it then stops, and just hangs. Closing the media library and opening it does not help, I have to refresh the whole page.

@designsimply designsimply added the Needs Testing Needs further testing to be confirmed. label Nov 5, 2018
@designsimply
Copy link
Member

I was unable to reproduce the problem using the following testing steps and testing with WordPress 4.9.8 and Gutenberg 4.2.0 using Firefox 63.0.1 on macOS 10.13.6:

  1. Go to Posts > Add new.
  2. Add a title.
  3. Insert an image using the "Media Library" button in the image block.
  4. Insert another image using the "Media Library" button in the image block.
  5. Add some text in a paragraph.
  6. Insert another image using the "Media Library" button in the image block.

Result: the media library opened normally for me when using the "Media Library" button in the image block. (58s)

Are your steps the same as the ones I've noted above?

Are you using a classic block (or some other block) instead of an image block?

Are you able to open the Media Library directly using that option in the left sidebar?

Can you note your OS and browser versions for reference?

If possible, can you try to see if there are any errors in the browser console at the time you try to open the media library for the second time?

@designsimply designsimply added [Status] Needs More Info Follow-up required in order to be actionable. and removed Needs Testing Needs further testing to be confirmed. labels Nov 7, 2018
@rowroll
Copy link
Author

rowroll commented Nov 11, 2018

Hi @designsimply

I have a Windows 10 machine, running Chrome Version 70.0.3538.102 (Official Build) (64-bit). I can't seem to find the version number of Gutenberg, but I first installed it the day I submitted the comment.

Here are my steps:

  1. Go to Posts > Add new.
  2. Add a title.
  3. Add a Gallery block.
  4. Click on Media Library inside the Gallery Block, add two photos.
  5. Enter the gallery on to the page. The photos appear. All is fine.
  6. Add another Gallery block.
  7. Click on Media Library in the Gallery Block again,
  8. Drag a photo onto the Media library to upload it.
  9. 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.
  10. Using the x on the upper right to close the Media library and opening it again, just brings up the same frozen upload.
  11. Drag another photo into the Media Library, upload also hangs.
  12. To resolve I have to refresh the entire page. Then I can resume uploading via the Media library.

The developer console has the following message
Active resource loading counts reached to a per-frame limit while the tab is in background. Network requests will be delayed until a previous loading finishes, or the tab is foregrounded. See for more details
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.8:9 JQMIGRATE: Migrate is installed, version 1.4.1
media-views.min.js?ver=4.9.8:2 Uncaught TypeError: Cannot read property 'text' of undefined
at n.info (media-views.min.js?ver=4.9.8:2)
at _ (backbone.min.js?ver=1.2.3:1)
at m (backbone.min.js?ver=1.2.3:1)
at f (backbone.min.js?ver=1.2.3:1)
at n.u.trigger (backbone.min.js?ver=1.2.3:1)
at n._onModelEvent (backbone.min.js?ver=1.2.3:1)
at _ (backbone.min.js?ver=1.2.3:1)
at m (backbone.min.js?ver=1.2.3:1)
at f (backbone.min.js?ver=1.2.3:1)
at n.u.trigger (backbone.min.js?ver=1.2.3:1)

Let me know if you need more info.

@designsimply designsimply added [Feature] Media Anything that impacts the experience of managing media Needs Testing Needs further testing to be confirmed. and removed [Status] Needs More Info Follow-up required in order to be actionable. labels Nov 30, 2018
@bobbingwide
Copy link
Contributor

I experienced the same problem with a similar scenario; attempting to upload and set the featured image. Having failed to make any progress while attempting to debug my scenario I attempted to reproduce the problem with the steps listed above. The console log , using WordPress 5.0.2 and Gutenberg v4.7.1, is almost identical.

Uncaught TypeError: Cannot read property 'text' of undefined
    at n.info (media-views.min.js?ver=5.0.2:2)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)
    at n._onModelEvent (backbone.min.js?ver=1.2.3:1)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)

image

@bobbingwide
Copy link
Contributor

I was also able to reproduce the problem with define('SCRIPT_DEBUG', true ); in WordPress 5.0.2 with no plugins and the Twenty Nineteen theme v1.1

Uncaught TypeError: Cannot read property 'text' of undefined
    at n.info (media-views.js?ver=5.0.2:5015)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)
    at n._onModelEvent (backbone.min.js?ver=1.2.3:1)
    at _ (backbone.min.js?ver=1.2.3:1)
    at m (backbone.min.js?ver=1.2.3:1)
    at f (backbone.min.js?ver=1.2.3:1)
    at n.u.trigger (backbone.min.js?ver=1.2.3:1)

I added console.log( this ); to the info: function. This screen capture might help.
image

@thmplt
Copy link

thmplt commented Mar 18, 2019

having the exact same issue. I have posts that are 100% relying on the galleries. Has anyone come up with a patch? or any info when WP will fix this?

@rowroll
Copy link
Author

rowroll commented Apr 16, 2019

This is still an issue, just confirmed it in Gutenberg 5.4.0 on Windows 10 and Chrome Version 73.0.3683.103 (Official Build) (64-bit).

@designsimply designsimply added [Type] Bug An existing feature does not function as intended and removed Needs Testing Needs further testing to be confirmed. labels Apr 16, 2019
@youknowriad
Copy link
Contributor

Would be good to have some eyes on this as time allows @antpb @joemcgill @getsource

@flexerd
Copy link

flexerd commented Dec 4, 2019

If this helps in advancing this in Cue having the same exact issue.
Server Cache = Litespeed. If I clear cache between uploads this does not occur.

@rafaucau
Copy link

rafaucau commented May 26, 2020

Still nothing going on in this issue?

@jakewhiteley
Copy link

I got this, but on an ACF settings page. I'm probably being stupid, but I cannot find a ticket for it on Trac. Does anyone know if its even being looked at by the core team?

@darwin370
Copy link

Same problem here with WordPress 5.6.1, Twenty Twenty-One 1.1, no plugins, Chrome Version 88.0.4324.150 (Official Build) (64-Bit), reproducable with steps provided by @rowroll

  1. Go to Posts > Add new.
  2. Add a title.
  3. Add a Gallery block.
  4. Click on Media Library inside the Gallery Block, add two photos.
  5. Enter the gallery on to the page. The photos appear. All is fine.
  6. Add another Gallery block.
  7. Click on Media Library in the Gallery Block again,
  8. Drag a photo onto the Media library to upload it.
  9. The upload bar shows 15%-ish done, but then just hangs. ...

Uncaught TypeError: Cannot read property 'text' of undefined at n.info (media-views.min.js?ver=5.6.1:2) at p (backbone.min.js?ver=1.4.0:2) at f (backbone.min.js?ver=1.4.0:2) at c (backbone.min.js?ver=1.4.0:2) at n.trigger (backbone.min.js?ver=1.4.0:2) at n._onModelEvent (backbone.min.js?ver=1.4.0:2) at p (backbone.min.js?ver=1.4.0:2) at f (backbone.min.js?ver=1.4.0:2) at c (backbone.min.js?ver=1.4.0:2) at n.trigger (backbone.min.js?ver=1.4.0:2)

@paaljoachim
Copy link
Contributor

I tested using WordPress 5.7.
Gutenberg plugin 10.
Twenty Twenty One.
Chrome

  1. Go to Posts > Add new.
  2. Add a title.
  3. Add a Gallery block.
  4. Click on Media Library inside the Gallery Block, add two photos.
  5. Enter the gallery on to the page. The photos appear. All is fine.
  6. Add another Gallery block.
  7. Click on Media Library in the Gallery Block again,
  8. Drag a photo onto the Media library to upload it.
  9. 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.
  10. Using the x on the upper right to close the Media library and opening it again, just brings up the same frozen upload.
  11. Drag another photo into the Media Library, upload also hangs.
  12. To resolve I have to refresh the entire page. Then I can resume uploading via the Media library.

I tested from 1 up to 9. Uploading gets stuck as you mention. This is what I noticed.

Screen Shot 2021-02-21 at 10 51 12

I am also getting this error along the way: #25805

The Block Gallery is getting renewed in this PR: #25940

@glendaviesnz
Seems like we need to check this out in relation to the new PR.

@paaljoachim paaljoachim added the [Block] Gallery Affects the Gallery Block - used to display groups of images label Feb 21, 2021
@rebeccahum
Copy link

I'm running into this issue with WP 5.7 currently. It is reproducible on a local install with the above test steps.

@glendaviesnz
Copy link
Contributor

@glendaviesnz
Seems like we need to check this out in relation to the new PR.

Thanks for the ping - looks like this is an issue in the core wp media library which the gallery refactor doesn't touch, so the gallery refactor will have the same issue, and any fix in core wp for this will fix the issue in the gallery refactor.

@lyx
Copy link

lyx commented Apr 16, 2021

I hope this info can narrow down the issue - I did some testing as well.

It seems that this upload freeze only occurs after a gallery component has had images inserted into the component, by clicking the Insert Gallery button.

Theoretically, based on the test cases here and my testing, it stands to reason that something is affecting the uploading of images when images are inserted into a gallery. I'll update here with any findings.

@glendaviesnz
Copy link
Contributor

I have added a core ticket for this https://core.trac.wordpress.org/ticket/53169 and possible fix WordPress/wordpress-develop#1235

@glendaviesnz
Copy link
Contributor

This is resolved in WP 5.8 and gutenberg 11.3.

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