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.

CommentFileSizeAuthor
#10 880824-no-empty-menu-block.patch1.2 KBygerasimov
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ygerasimov’s picture

I confirm that this bug still exists.

casey’s picture

This should be fixable using hook_modules_disabled or hook_modules_uninstalled.

ygerasimov’s picture

Same 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.

ygerasimov’s picture

The problem is in devel module itself. Please see #901176: Not removing devel menu on module disable

ygerasimov’s picture

Can we close this issue as duplicate?

webchick’s picture

Status: Active » Closed (duplicate)

yep. :)

salvis’s picture

Status: Closed (duplicate) » Active

No, 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.

ygerasimov’s picture

Title: Disabling a module leaves empty block in dashboard » Disabling module leaves menu in the list of Menus.
Component: dashboard.module » menu system

Looks 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.

ygerasimov’s picture

Status: Active » Needs review
FileSize
1.2 KB

As the solution maybe it is reasonable not to export block with empty menu. Please review the patch.

Status: Needs review » Needs work

The last submitted patch, 880824-no-empty-menu-block.patch, failed testing.