Gutenberg: Media library shows "No items found" when creating a new gallery

Created on 14 May 2020  路  8Comments  路  Source: WordPress/gutenberg

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.
[Block] Gallery [Feature] Media [Priority] High [Status] In Progress [Type] Bug

Most helpful comment

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

All 8 comments

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.

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

I have tested on several sites and can confirm.

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

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

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

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

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

Was this page helpful?
0 / 5 - 0 ratings