Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
This is a followup issue for #1535868: Convert all blocks into plugins and #1871772: Convert custom blocks to content entities.
- Currently, custom blocks can only be created or updated through the Block Library. There is no separate interface for updating their definitions.
- It is not currently possible to delete a custom block definition through the UI once one is created. (Only instances of the block can be deleted.)
- It is possible to configure multiple instances of the same custom block.
- Changing the block body or description is currently done on the block instance editing form, despite that changing these fields changes them for all instances of the custom block. This introduces a usability bug.
Proposed resolution
- Provide a separate interface for editing custom blocks, perhaps an entity form once custom blocks are entities.
- Disable or remove the block body and description fields on the custom block plugin edit form.
- Help the user discover how to update the block definition when editing a configured instance, or vice versa.
- Refine the workflow based on the final blocks and layouts UI.
Remaining tasks
Related issues
- #1871772: Convert custom blocks to content entities
- #1874598: Add BlockTestBase
- #1874822: Add functional test coverage for placing multiple blocks
- #1874830: Add a test block plugin implementation with test coverage
- #1874584: "Block Library" link label is unclear
- #1875780: "Configure block" button text in the Block Library is confusing
Comment | File | Size | Author |
---|---|---|---|
#5 | edit_block.png | 208.43 KB | YesCT |
#5 | configure_block.png | 218.93 KB | YesCT |
Comments
Comment #0.0
xjmUpdated issue summary.
Comment #0.1
xjmUpdated issue summary.
Comment #1
xjmComment #2
tim.plunkett#1871772: Convert custom blocks to content entities will likely solve 90% of this, postponing for now.
Comment #3
xjmComment #4
jibran#1535868: Convert all blocks into plugins and #871772: Installed and Configured, but nothing happens are in so back to active again.
Comment #5
YesCT CreditAttribution: YesCT commentedi think things have changed.
right now for a custom block I added, when I edit the block (via the pencil -> edit when viewing the block on the site) I get:
when configuring the block (either via the block admin list, or the pencil -> configure) I get:
I came to this issue because I was looking for existing issues related to confusions I had in #13 and #14 in #1948884-13: Create configuration schemas for block and custom_block modules
I thought it was strange that I could not set the title when I edited the block.
Comment #6
xjmYeah, the original problem was fixed by the custom block conversion issue, so let's open specific issues for any remaining/confusing WTFs.
Comment #6.0
xjmUpdated issue summary.