Add test coverage for the "disabled" block status.

Created on 3 January 2013, over 12 years ago
Updated 25 August 2025, 25 days ago

Posted by xjm

Problem/Motivation

This is a followup issue for #1535868: Convert all blocks into plugins .

  • The block architecture currently provides a "disabled" status that allows users to disable blocks so that they are not displayed in the UI.
  • Following #1535868: Convert all blocks into plugins , this status becomes a per-instance setting. (Each block can have zero, one, or many configured instances per theme.) There are no disabled block instances on installation; users enable blocks by creating a new instance.
  • However, users can disable block instances by moving them to the "disabled" section of the block administrative UI, or by setting their region to "none" on the block instance editing form.
  • Users can also delete any block instance following #1535868: Convert all blocks into plugins . This makes the disabled status for blocks less necessary, since a user can remove an unwanted block instance without affecting the block definition.
  • The "disable" functionality does not have complete test coverage (the patch in #1535868: Convert all blocks into plugins previously had bugs relating to disabling blocks that did not have test failures).

Proposed resolution

  • Decide whether the "disabled" block instance status is still relevant, or whether it is unneeded complexity when users can simply remove block instances.
  • Add test coverage for the "disabled" status if it is kept.
  • Otherwise, remove it entirely, both from the block plugin and from procedural handling code.
📌 Task
Status

Postponed: needs info

Version

11.0 🔥

Component

block.module

Created by

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • stale-issue-cleanup

    To track issues in the developing policy for closing stale issues, [Policy, no patch] closing older issues

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    Thank you for creating this issue to improve Drupal.

    We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.

    Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024