Posted by dwightaspinwall on December 21, 2011 at 11:16am
3 followers
Jump to:
| Project: | Page Title |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Setting a custom pattern for User Profile doesn't work for me because the calls to menu_get_object() from user_page_title_alter() and user_page_title_pattern_alter() fail. They fail (return NULL) because the following check in menu_get_object() fails:
$router_item['load_functions'][$position] == $type .'_load'because the load function is user_uid_optional_load(), not user_load(). And this is in core, specified in user.module:
$items['user/%user_uid_optional'] = array(
'title' => 'My account',
'title callback' => 'user_page_title',
'title arguments' => array(1),
'page callback' => 'user_view',
'page arguments' => array(1),
'access callback' => 'user_view_access',
'access arguments' => array(1),
'parent' => '',
'file' => 'user.pages.inc',
);Happy to try for a patch if provided a little direction.
Comments
#1
Happy to accept a patch. That function does exist:
http://api.drupal.org/api/drupal/modules--user--user.module/function/use...
It either returns the current user, if there is no argument provided, or the user provided by the argument.
How do you mean they "fail"?
#2
Ohhh wait - I see... fixing now.
#3
Fixed in Dev. Will be in 2.6 release.
See: http://drupalcode.org/project/page_title.git/commitdiff/2830a791270ada95...
#4
Automatically closed -- issue fixed for 2 weeks with no activity.