Active
Project:
CCK Redirection
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2009 at 15:27 UTC
Updated:
23 Apr 2009 at 15:27 UTC
cck_redirection.module does not honor any custom help text which the user enters for this field. The module is hardcoded to display "Enter a valid URI (i.e. http://www.example.com)."
To fix this, change these lines of cck_redirection.module:
function cck_redirection_widget($op, &$node, $field, &$items) {
switch ($op) {
case 'prepare form values':
break;
case 'form':
$form = array();
$form[$field['field_name']]['#tree'] = TRUE;
$form[$field['field_name']][0]['value'] = array(
'#type' => 'textfield',
'#title' => t($field['widget']['label']),
'#default_value' => $items[0]['value'],
'#required' => $field['required'],
'#description' => t('Enter a valid URI (!i).', array('!i' => 'i.e. http://www.example.com')),
);
To this
function cck_redirection_widget($op, &$node, $field, &$items) {
switch ($op) {
case 'prepare form values':
break;
case 'form':
$form = array();
$form[$field['field_name']]['#tree'] = TRUE;
$form[$field['field_name']][0]['value'] = array(
'#type' => 'textfield',
'#title' => t($field['widget']['label']),
'#default_value' => $items[0]['value'],
'#required' => $field['required'],
'#description' => (isset($field['widget']['description']) && strlen($field['widget']['description']) ?
$field['widget']['description'] :
t('Enter a valid URI (!i).', array('!i' => 'i.e. http://www.example.com')) ),
);
Unfortunately, I can't submit a patch, as the copy of my module has already been patched as per http://drupal.org/node/192897