Block directory doesn't work when blocks are hidden #38500
Labels
[Feature] Block API
API that allows to express the block paradigm.
[Feature] Block Directory
Related to the Block Directory, a repository of block plugins
[Type] Bug
An existing feature does not function as intended
Description
If you have any blocks hidden, the block directory won't load any external results. This is caused by the
canInsertBlockType
check, which checks againstallowedBlockTypes
. When there are hidden blocks, this list is set to the current registered blocks, minus those hidden blocks (source).Since this is a safelist to match against, rather than a "disallowed" list, anything not on the list is blocked, and since it's created from locally registered blocks, nothing in the Block Directory is allowed.
Related to #33954
Step-by-step reproduction instructions
table
,recipe
, etcScreenshots, screen recording, code snippet
Screen.Recording.2022-02-03.at.12.49.18.PM.mov
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: