It is impossible to disable a block from the block configuration edit page

Created on 24 June 2024, 6 months ago
Updated 17 July 2024, 5 months ago

Problem/Motivation

It is impossible to disable a block from the block configuration edit page; you need to go to the Block layout listing (/admin/structure/block) to select "Disable" from the dropdown options there.

Anything that affects a block's configuration should be doable from the individual block Configure block page (/admin/structure/block/manage/exampleblock)โ€” this would be anybody's expectation. And indeed this is the case for translating the block (available as the tab "Translate block") and removing the block (available as the button "Remove block").

Proposed resolution

Add a button "Disable block" between "Save block" and "Remove block" or turn "Remove block" into a dropdown button with "Disable block" and "Remove block".

Remaining tasks

This problem shows up in contrib fairly often too; there may be a deeper layer in core than the Block module that this can be fixed. In any case the solution should be documented.

User interface changes

A new button is added (either on its own or as part of a dropdown)

A "This block is enabled" boolean toggle is also an option but this makes more sense as a button.

API changes

None.

Data model changes

None.

Release notes snippet

Blocks can now be disabled form individual "Configure block" pages. If your module provides configuration that can be disabled, not only deleted, it is recommended to follow the same practice.

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Blockย  โ†’

Last updated 5 days ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States mlncn Minneapolis, MN, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mlncn
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mlncn Minneapolis, MN, USA

    Screenshots of the current situation.

    Configure block page:

    Block layout page:

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mlncn Minneapolis, MN, USA

    The contextual menu is another place this could be done, but i'd call that a separate feature request, whereas i really do feel the inability to disable a block from the main configuration page for that block is a usability bug. In particular because not having the disable link on the block configuration page makes the contextual links way less useful. You want to quickly disable a blockโ€”not remove it, which would lose all the configuration associated with it (including which pages to show on)โ€”and you choose "Configure block" but now to disable it you would have to go to Block layout and find the block, which defeats the purpose of the contextual links.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mlncn Minneapolis, MN, USA

    Here is the issue for a contextual link to disable the block, โœจ Add contextual menu item on blocks to allow disabling them Needs work

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone
Production build 0.71.5 2024