Closed (fixed)
Project:
AdaptiveTheme
Version:
7.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Dec 2012 at 19:44 UTC
Updated:
13 Jan 2013 at 13:30 UTC
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!
| Comment | File | Size | Author |
|---|---|---|---|
| at-override-user-register-title.patch | 1.48 KB | ezra-g |
Comments
Comment #1
Jeff Burnz commentedLooks good, I'll commit in a day or two.
Comment #2
Jeff Burnz commentedI 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.