Closed (fixed)
Project:
Page Title
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2011 at 11:16 UTC
Updated:
20 Jan 2012 at 17:00 UTC
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
Comment #1
nicholasthompsonHappy 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"?
Comment #2
nicholasthompsonOhhh wait - I see... fixing now.
Comment #3
nicholasthompsonFixed in Dev. Will be in 2.6 release.
See: http://drupalcode.org/project/page_title.git/commitdiff/2830a791270ada95...
Comment #4.0
(not verified) commentedupdate original message