Menu router items for [path], [path]/register, [path]/login, and [path]/password will be generated.
With the new registration path ( [path]/register instead of user/register/[path] ) the registration form title is wrong.

- It is showing 'Home' as title instead of 'Create new account' ( [path]/register )
- It is showing 'Home' as title Instead of 'Request new password' ( [path]/register )
- it is showing 'Create new account' as title Instead of 'User account' ( [path] )

Note: I'm using a dutch version and translated the above titles myself so it can be a little off the original. Or using the translated version can be the problem?
checking the english version now.

Nope changed the lang to english, cleared all cache still the same issue.

CommentFileSizeAuthor
#8 image-09-2012-22_103710.jpg10.31 KBbmatthewshea

Comments

grasmash’s picture

Hmm.. I see that you're right. Weird, the menu router item titles are set correctly in the code. I'll have to look into it.

grasmash’s picture

- it is showing 'Create new account' as title Instead of 'User account' ( [path] )

Fixed this aspect of the bug. Still working on 'Home' titles. It seems like the 'title' key for MENU_DEFAULT_LOCAL_TASK and MENU_LOCAL_TASK actually controls the text on the tab, not the main page's title.

grasmash’s picture

Status: Active » Fixed

Ok, got it all sorted out. Changes have been pushed to dev.

I've set the page titles to 'User Account' for the pages in question. This is the default title set by Drupal core.

I'm considering adding an option for Administrators to set the page title for these pages. Is that something that you would find useful?

scuba_fly’s picture

Setting the page title option for Administrators might be useful.
But using the t() function lets Administrators already change the page title?

grasmash’s picture

Yes, you can use t() to change the 'User Account' page title. Unfortunately, Drupal core applies the same exact page title of 'User Account' to the login, register, and forgot password pages.

I've often had to work around this issue on a theming level, so I was in favor of adding this feature. In reality, we probably don't need to change the title on the login and password pages, but this can definitely be helpful when labeling different registration forms.

mrharolda’s picture

I've encountered the same problem, but we're not using the profile2 module?!?

Anyway: I "solved" it in a theme_preprocess_page() like this: http://drupal.org/node/100450#comment-4885984

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bmatthewshea’s picture

Category: bug » task
StatusFileSize
new10.31 KB

I've encountered the same problem, but we're not using the profile2 module?!?
Anyway: I "solved" it in a theme_preprocess_page() like this

I do not use profile2 either and have same issue.
For me this worked. (7.14):

grasmash’s picture

How could you be using the Profile2 Registration Path module without using Profile2?

grasmash’s picture

Issue summary: View changes

confirmed that is was not a language issue

playfulwolf’s picture

Issue summary: View changes

2.5 year passed, D7.26, not using profile2, but the same issue

ravermeister’s picture

similar issue here,

the title is not home, but a link of a content page...
( I think it is the title of the page where the menu item of the page has the user register as a sub menu item and it is the last saved user login/register menu item)
but when i toggle the tabs register/login/lost password
it turns to the exact issue described above...
see http://www.bfbb-ev.tk
"Anmelden" is user login/register

does there exist any solution yet?

or is it better to implement hook_form_alter in a custom module
and alter the title there?

thanks in advance
jonny

p.s. I now have following temporary solution:
in my custom theme under sites/all/themes/MYTHEME

I had an empty template.php
and added following to it:

function bfbb_preprocess_page(&$vars){
    
    
    
    if (arg(0) == 'user') {
        switch (arg(1)) {
            case NULL:
                if (!user_is_logged_in()) 
                    drupal_set_title(t('Log in'));
            break;
            case 'register':
                drupal_set_title(t('Create a new user account.'));
            break;
            case 'password':
                drupal_set_title(t('Request new password'));
            break;
            case 'login':
                drupal_set_title(t('Log in'));
            break;
        }
    }
}
matt v.’s picture

In case it might help others who run across this issue, the same symptoms can appears due to an issue in Drupal core: #1973262: User pages display incorrect title instead of "Menu link title" when link paths are added to a default menus

I'm mentioning it here, since my initial search pointed me to this issue before the one in core.