Drupal自定义块在列表中不可见

Drupal自定义块在列表中不可见,drupal,drupal-7,drupal-modules,Drupal,Drupal 7,Drupal Modules,我从头创建了四个模块。其中两个模块显示,两个模块不显示。现在我已经创建了另一个新模块,但仍然没有显示它 信息: 模块: <?php /** * Purpose: * Implements issuu_home_block_info. * * * @return $blocks * * @since Feb 2017 */ function issuu_home_block_info() { $blocks['issuu_home'] = array( 'info' =>

我从头创建了四个模块。其中两个模块显示,两个模块不显示。现在我已经创建了另一个新模块,但仍然没有显示它

信息:

模块:

<?php
/**
* Purpose:
* Implements issuu_home_block_info.
*
*
* @return $blocks
*
* @since Feb 2017
*/
function issuu_home_block_info() {
  $blocks['issuu_home'] = array(
      'info' => t('Issuu Home block for issuu landing page'),
      'subject' => t('Issuu Home block for issuu landing page'),
      'cache' => DRUPAL_NO_CACHE,
      //'status' => 1,
      //'visibility' => 1,      
      //'weight' => 0,
      //'cache' => DRUPAL_CACHE_PER_ROLE,
      //'status' => 1,
      // For block to be listed as disabled on blocks page, set region to -1.
      'region' => -1,
      //'theme' => 'csny',
    );
}
function issuu_home_menu() {
  $items = array();
  $items['issuu_home'] = array( //this creates a URL that will call this form at "examples/form-example"
    'title' => 'Issuu Home List', //page title
    'description' => 'List of Issuu Home',
    'page callback' => 'issuu_home', //this is the function that will be called when the page is accessed.  for a form, use drupal_get_form
    'type' => MENU_CALLBACK,
    'access callback' => TRUE
  );

  return $items;
}
function issuu_home() {
    $output = "Issu Home"
    return $output;
}
/**
 * Implements hook_block_view
 *
 * Passes off the function call to _custom_module_view_DELTA
 */
function issuu_home_block_view($delta = '') {
    $blocks = array();
    $blocks['issuu_home_block'] = array(
        'info' => t('Issuu Home Block'),
        'subject' => t('Issuu Home Block'),
        'status' => 1,
    );
    $block = array(
        'content' => issuu_home(),
    );
    return $block;
}
我还遵循禁用模块>>卸载>>清除缓存>>激活

我尝试了状态、缓存,但没有成功。

您的HOOK\u block\u信息不会返回blocks变量。 将其更改为:

function issuu_home_block_info() {
  $blocks['issuu_home'] = array(
      'info' => t('Issuu Home block for issuu landing page'),
      'subject' => t('Issuu Home block for issuu landing page'),
      'cache' => DRUPAL_NO_CACHE,
      //'status' => 1,
      //'visibility' => 1,      
      //'weight' => 0,
      //'cache' => DRUPAL_CACHE_PER_ROLE,
      //'status' => 1,
      // For block to be listed as disabled on blocks page, set region to -1.
      'region' => -1,
      //'theme' => 'csny',
  );

  // You must return the $blocks variable
  return $blocks;
}
欢迎最终询问:您的代码块以开始。信息:标记所有代码块,并在post editor中使用{}按钮或其键盘快捷键。仍然不显示->不显示或不可见/显示
function issuu_home_block_info() {
  $blocks['issuu_home'] = array(
      'info' => t('Issuu Home block for issuu landing page'),
      'subject' => t('Issuu Home block for issuu landing page'),
      'cache' => DRUPAL_NO_CACHE,
      //'status' => 1,
      //'visibility' => 1,      
      //'weight' => 0,
      //'cache' => DRUPAL_CACHE_PER_ROLE,
      //'status' => 1,
      // For block to be listed as disabled on blocks page, set region to -1.
      'region' => -1,
      //'theme' => 'csny',
  );

  // You must return the $blocks variable
  return $blocks;
}