Problem
When for any reason, one or more empty reusable Gutenberg blocks exist on the Drupal installation, this breaks the editor when trying to add a new block to any content type.
Replication
- Create a reusable block
- Go to /admin/structure/block/block-content and click edit on your reusable block
- Delete the content field of that block
- Go back to editing a page with Gutenberg and try to insert any block
Suggested solution
A: Provide a valid error message about a reusable block has no content, with a link to edit it (or simply delete it?)
B: Ignore the block in the Gutenberg blocks selector?
C: Rewrite the current error message to inform about this case?
D: Make the block be used (might be content on the site relying on the block, that simply needs new content). When used we could show the same message as when the full block has been deleted:

Remaining tasks
Decide a UX pattern that that makes sense
Build out content / help texts for the handling.
Implement the improvement
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Skjermbilde 2019-11-26 kl. 09.03.32.png | 12.04 KB | thorandre |
Comments
Comment #2
thorandre commentedI was able to recreate the issue. This could happen for example if a block is deleted in the Drupal custom blocks UI.
Comment #3
jhhansen commentedGreat replication, thank you :)
I'm leaning towards supporting your suggestion D.
Comment #4
shane birley commentedComment #5
shane birley commentedComment #6
henrikakselsen commentedCould not recreate this on 2.x branch