The Commons designs call for the page title of user/register to be "Sign up". Altering the page callback title or doing drupal_set_title() when altering the user registration form is overridden by at_core, which does:

  // Work around a perculier bug/feature(?) in Drupal 7 which incorrectly sets
  // the page title to "User account" for all three of these pages.
  if (arg(0) === 'user') {
    if (arg(1) === 'login' || arg(1) == '') {
      drupal_set_title(t('User login'));
    }
    if (arg(1) === 'password') {
      drupal_set_title(t('Request new password'));
    }
    if (arg(1) === 'register') {
      drupal_set_title(t('Create new account'));
    }
  }

The attached patch makes at_core check if the page title is set to 'Create new account' and only overrides the page title for the specified paths in that case.

Is there a specific core issue this code comment refers to? It would be ideal to attempt to fix in core rather than the theme layer, if possible.

Thanks!

CommentFileSizeAuthor
at-override-user-register-title.patch1.48 KBezra-g

Comments

Jeff Burnz’s picture

Status: Needs review » Patch (to be ported)

Looks good, I'll commit in a day or two.

Jeff Burnz’s picture

Status: Patch (to be ported) » Fixed

I pushed the patch, good improvement!

There is no core issue (I never created one) because it would be a feature request and my assertation of "incorrect" is subjective, I see this as a usability improvement, as does Commons by wanting to change the title to "Sign up" which is more in keeping with the modern vernacular.

Status: Fixed » Closed (fixed)

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