Problem/Motivation
If checkbox "All" for setting allowed content block types is ticked without ticking any of the content types (so that configuration array CONTENT_TYPE_allowed_content_block_types has only value 'content-block/all'), content blocks are not visible on Gutenberg editor.
Steps to reproduce
1. Navigate to edit some content type eg. /admin/structure/types/manage/page
2. Tick Gutenberg experience -> Allowed content block types -> All
3. Create content block type (/admin/structure/block-content/add)
4. Create content block of the same type (/block/add)
5. Navigate to edit content with Gutenberg editor. It must be the same type as in step 1.
6. Look for the block created in step 4.
Proposed resolution
Take value 'content-block/all' into account inside BlocksController.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|
Issue fork gutenberg-3501425
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kul.pratap commentedWorking on it.
Comment #4
kul.pratap commentedI have done the changes now all block types are showing and now we can also create block of these block types in the gutenberg editor.
Attaching screenchot for reference:
Before Changes:/
After Changes
Please review.
Thanks
Comment #5
sayan_k_dutta commentedReviewed the MR. The changes seem to resolve the issue. All the custom blocks created are now visible under blocks options in gutenberg editor. Attaching screenshots for the same and moving this to RTBC.
Comment #6
codebymikey commentedI think a more global change also needs to be made to how the Gutenberg Experience settings work.
Such that upon selecting "All":
1. All the other blocks are automatically ticked (just like the current behaviour is).
2. All the other blocks are also disabled.
3. The only setting that will be in the config would be "all", rather than duplicating all the other stuff.
Currently "All" only ticks the blocks which are currently available, and won't pick up new entries.
A post update hook might also be necessary to clean the existing configs up to marry up (but it's not strictly necessary for an MVP).