drupal_set_title() does not work

Created on 18 July 2013, almost 11 years ago
Updated 24 April 2024, about 1 month ago

i am trying in two sites. version of drupal sites are drupal7.21 and drupal 7.22. In drupal7.22 its working whereas in drupal7.21 its not working.

function hook_form_alter(&$form, &$form_state, $form_id)
{
    switch($form_id) {
        case 'product_node_form':
            drupal_set_title('My title');
            break;      
        default:
            break;
    }
}

this code is able to set the title in drupal7.22, where as in drupal7.21 its not displaying the title as setted.

If i try drupal_get_title(), it is displaying the title which was setted by me.I dont know how its getting overridden somewhere in earlier version of drupal7.21.

Why its not working ??

💬 Support request
Status

Active

Version

7.0 ⚰️

Component
Other 

Last updated about 12 hours ago

Created by

🇮🇳India Ram_doss

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024