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 shows "No items found" when creating a new gallery #22338

Closed
jeremyfelt opened this issue May 14, 2020 · 9 comments · Fixed by #22659
Closed

Media library shows "No items found" when creating a new gallery #22338

jeremyfelt opened this issue May 14, 2020 · 9 comments · Fixed by #22659
Assignees
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Feature] Media Anything that impacts the experience of managing media [Priority] High Used to indicate top priority items that need quick attention [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@jeremyfelt
Copy link
Member

Describe the bug
When I create a new page and add a gallery block, no media items are available for me to select. If I try to edit that new gallery, all items in my media library are already selected.

To reproduce
Steps to reproduce the behavior:

  1. Add new page.
  2. Insert gallery block.
  3. Click "Media library"
  4. See "No items found" in "Add to Gallery" section.
  5. Click "Edit gallery"
  6. See all items selected.

Expected behavior

  • I would expect the images from the media library to be available for selection in the "Add to Gallery" area.
  • I would expect only previously selected images to be selected in the "Edit gallery" area.

Screenshots
empty-media-library-gallery

Editor version:

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

Desktop:

  • OS: MacOS 10.14.6
  • Browser: Firefox
  • Version: 76.0.1

Additional context

  • If I deactivate the Gutenberg plugin or downgrade the plugin to 8.0.0, the gallery works as expected.
  • The admin-ajax.php call made by the media library returns some set of objects on that initial load. I did not dig into why they did not appear.
  • During a couple attempts, I would briefly see a flash of the available media before it disappeared and "No items found" was displayed.
@talldan talldan added [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 labels May 14, 2020
@cngodles
Copy link

This has happened to me today. What is happening is it's adding every single piece of media from your site to the gallery, thus there is nothing new to add. If you click Edit gallery, they are all selected in there.

@talldan talldan added the [Priority] High Used to indicate top priority items that need quick attention label May 18, 2020
@GlennMartin1
Copy link

Same here; I cannot create a new gallery :-(

@kristarella
Copy link

I have tested on several sites and can confirm.

@roo2
Copy link
Contributor

roo2 commented May 27, 2020

Just adding, I can only reproduce this if I access the gutenberg editor directly via wp-admin, if I access the wrapped version on wp.com it uses the different media picker which doesn't have the issue.
wrong-media-library

@cngodles
Copy link

This is still an issue for me. When I try to add a new gallery, it loads images for a second or two, and then it goes away. Upon inspection, the entire media library seems to be loaded into the gallery.

Running WP 5.4.1 and Gutenberg 8.2.0
Cleared cache and tested on both Firefox and Chrome latest. Windows latest.

image

wp-gallery

@jeremyfelt
Copy link
Member Author

@cngodles This has been merged for the upcoming 8.3.0 release. We should see the results soon!

@GlennMartin1
Copy link

@youknowriad any possibility of an 8.2.1 to address this?
https://wordpress.slack.com/archives/C02QB2JS7/p1590658332400100

@youknowriad
Copy link
Contributor

@GlennMartin1 yes, I'm releasing it right now.

@fazliddin
Copy link

fazliddin commented Feb 14, 2021

Us usual solution is to disable all plugins. It took me a day to find the problem. It turns out PolyLang plugin separates images by language. So if all images are uploaded in English, they will not be shown in French.

Solution is to go to PolyLang settings and turn off media library support.

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 [Priority] High Used to indicate top priority items that need quick attention [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants