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

Block Directory doesn't work reliably #24911

Open
maddisondesigns opened this issue Aug 29, 2020 · 3 comments
Open

Block Directory doesn't work reliably #24911

maddisondesigns opened this issue Aug 29, 2020 · 3 comments
Labels
[Feature] Block Directory Related to the Block Directory, a repository of block plugins [Type] Bug An existing feature does not function as intended

Comments

@maddisondesigns
Copy link

Describe the bug
When performing a search for maps, it shows results from the Block Directory. After adding a block, if I perform another search for Maps in the Block Inserter, it doesn't show the Maps Block I just inserted, and the results show it available for adding, even though it's already installed.

Search results show the Maps Block for Gutenberg available for adding even when it's already installed and added in the page

screenshot_92

Plugin is already installed yet it allows me to try and add it again.

screenshot_93

Performing the same search and installing another plugin, I can see that a new plugin is installed (correctly).

screenshot_94

When I delete this second block (because it prompted me for an Apple Key), it deactivated and deletes the plugin as well.

When I delete the original maps block I inserted, the plugin isn't deactivated and isn't removed.

screenshot_96

To reproduce
Steps to reproduce the behavior:

  1. Open Block Inserter
  2. search for maps
  3. Install first block result
  4. open block inserter
  5. search for maps
  6. notice that the original block doesn't show as being installed and is listed in search results again, intead of showing in the block library
  7. install second Maps block result
  8. In another tab, browse to Plugins screen to confirm two plugins were installed
  9. Delete second maps block from page and save
  10. In another tab, browse to Plugins screen to confirm plugin was deleted
  11. Remove first maps block that was installed and save
  12. In another tab, browse to Plugins screen to see if plugin was deleted

Expected behavior
Plugins installed from Block Directory don't reliably get removed when block is deleted.

Editor version (please complete the following information):

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

Desktop (please complete the following information):

  • OS: macOS 10.15.6
  • Browser: Firefox 79.0
@aristath aristath added the [Feature] Block Directory Related to the Block Directory, a repository of block plugins label Sep 1, 2020
@ryelle
Copy link
Contributor

ryelle commented Sep 1, 2020

Thanks for creating such detailed issues!

notice that the original block doesn't show as being installed and is listed in search results again, intead of showing in the block library

I think this is an issue with the "Maps Block for Gutenberg" plugin, it should add the word "maps" to the keywords. We also already have an issue for installed blocks showing up in the search results due to search mismatches like this: #24560

Plugins installed from Block Directory don't reliably get removed when block is deleted.

Did you refresh the editor page at all in this process? The editor only knows to remove blocks that were added since a page refresh (though that's definitely something to improve). #22307 has some previous discussion about how to approach that.

@maddisondesigns
Copy link
Author

Did you refresh the editor page at all in this process?

Nope. I didn't refresh the page at all

@StevenDufresne
Copy link
Contributor

Tested using: master@bd8bfeacae193b3c249b8baffd0248595b2a0d47.

After following the steps to reproduce, the plugins are no longer listed on the plugins page.

However, after searching again for maps and installing the same 2 blocks (after running all the steps listed above), the installation throws the Error registering block. Try reloading the page. error message. If you reload the page, the blocks were re-installed properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block Directory Related to the Block Directory, a repository of block plugins [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

5 participants