Block does not show in admin list.

If you programatically create a block using hook_block_info(); it will not show in the admin list under the following circumstances

  1. If you set Status to true & you do not have Region set at all

One way to fix this is to separate status and region check in the _block_rehash() function
Patch to follow

CommentFileSizeAuthor
#1 seperate_status_and_region_check.patch948 bytesgamelodge
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gamelodge’s picture

Title: _block_rehash | prevents block from showing in admin list » Patch
FileSize
948 bytes

Patch attached

gamelodge’s picture

Title: Patch » _block_rehash | prevents block showing in admin list
gamelodge’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, seperate_status_and_region_check.patch, failed testing.

Version: 7.22 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.