Closed (fixed)
Project:
Page Title
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2008 at 16:03 UTC
Updated:
14 Jul 2012 at 19:39 UTC
In Drupal 6, the values associated with the keys title, and description in the array defining the module menu must be values that Drupal then passes to the function t().
Code like
$items['admin/content/page_title'] = array(
'title' => t('Page titles'),
'description' => t('Enhanced control over the page titles (in the <head> tag).'),
'page callback' => 'drupal_get_form',
'page arguments' => array('page_title_admin_settings'),
'access callback' => 'user_access',
'access arguments' => array('administer page titles'),
'type' => MENU_NORMAL_ITEM,
);
results in t() being called twice: once from the module, and once from Drupal.
The code should be correct like follows:
$items['admin/content/page_title'] = array(
'title' => 'Page titles',
'description' => 'Enhanced control over the page titles (in the <head> tag).',
'page callback' => 'drupal_get_form',
'page arguments' => array('page_title_admin_settings'),
'access callback' => 'user_access',
'access arguments' => array('administer page titles'),
'type' => MENU_NORMAL_ITEM,
);
Comments
Comment #1
nicholasthompsonCommitted a fix to 6.x-2.x-dev...
Comment #2
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.