Hi there,

Because of logic in hook_menu getting lack of performance at admin/config page. Items are not being cached. Tested both on local env and Pantheon.

The same code for the 6 and 7 versions need to be divided:

  // Admin page.
  if (defined('VERSION') && substr(VERSION, 0, 1) >= 7) {
    $config_url = 'admin/config/development/httprl';
  }
  else {
    $config_url = 'admin/settings/httprl';
  }
  $items[$config_url] = array(
    'title' => 'HTTPRL',
    'description' => 'Configure HTTPRL settings.',
    'access arguments' => array('administer site configuration'),
    'page callback' => 'drupal_get_form',
    'page arguments' => array('httprl_admin_settings_form'),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'httprl.admin.inc',
  );

Drupal 7, just:

  // Admin page.
  $items['admin/config/development/httprl'] = array(

Drupal 6, just:

  // Admin page.
  $items['admin/settings/httprl'] = array(
CommentFileSizeAuthor
#1 hook_menu_fix-2477227.patch608 bytessawabe

Comments

sawabe’s picture

StatusFileSize
new608 bytes

Patch

sawabe’s picture

Status: Needs work » Needs review
sawabe’s picture

Title: Defined by hook_menu items are not cached » Defined by hook_menu items don't cached
sawabe’s picture

Issue summary: View changes
mikeytown2’s picture

Status: Needs review » Postponed (maintainer needs more info)
sawabe’s picture

Sorry for taking so long to reply. I think we can close this. Cannot reproduce the issue on other instances.
@mikeytown2 is right about caching, but proposed patch solved my issue.
Thanks.

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)