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.
I enabled devel and placed the switch user block onto the dashboard. Then I disabled devel and looked at the dashboard. The block is still there and will even let me configure it at admin/structure/block/manage/devel/switch_user/configure but it displays only "(empty)".
Blocks from disabled modules should not show up.
Comment | File | Size | Author |
---|---|---|---|
#10 | 880824-no-empty-menu-block.patch | 1.2 KB | ygerasimov |
Comments
Comment #2
ygerasimov CreditAttribution: ygerasimov commentedI confirm that this bug still exists.
Comment #3
casey CreditAttribution: casey commentedThis should be fixable using hook_modules_disabled or hook_modules_uninstalled.
Comment #4
ygerasimov CreditAttribution: ygerasimov commentedSame problem is when you put the devel block to any other region (for example Content). After disabling module it is still listed in the list of the blocks.
Comment #5
ygerasimov CreditAttribution: ygerasimov commentedThe problem is in devel module itself. Please see #901176: Not removing devel menu on module disable
Comment #6
ygerasimov CreditAttribution: ygerasimov commentedCan we close this issue as duplicate?
Comment #7
webchickyep. :)
Comment #8
salvisNo, core's Search block has the same problem, as discussed in #901176: Not removing devel menu on module disable.
IMO the Dashboard should hide empty blocks, as Drupal does normally.
In addition, core should hide the Development menu block from the block configuration page if Devel is disabled, just as it does for the Search and Switch Users blocks. I don't see why menu blocks shouldn't be treated in the same way by core as other blocks. Please open a new issue for this.
Comment #9
ygerasimov CreditAttribution: ygerasimov commentedLooks like the problem comes to menu module. After disabling Devel module we can see Development menu in list of menus. I think this is why block is not cleared from the blocks list.
menu_block_info() function still return block for Development menu that is not nice.
Comment #10
ygerasimov CreditAttribution: ygerasimov commentedAs the solution maybe it is reasonable not to export block with empty menu. Please review the patch.