I have the RealName module installed and would like to see the users’ real names in breadcrumbs in their blog node pages. Currently, only their usernames appear in the breadcrumbs even though they’ve supplied their real names. Obviously, if someone didn’t supply their real name or opted not to display it publicly, you’d see their usernames in the breadcrumb trail. How can I get this done?

CommentFileSizeAuthor
blog breadcrumbs.jpeg11.21 KBazwildcat

Comments

bsherwood’s picture

Project: Drupal core » Real Name
Version: 6.15 » 6.x-1.3
Component: blog.module » Miscellaneous

You might get more help from the RealName issue queue.

Brian Keller-Heikkila’s picture

I have this problem too. Anyone figure out a patch that fixes this?

chris.toler’s picture

Bump.

kreynen’s picture

Status: Active » Needs review

This is a simple fix. decode_entities(l($account->realname, '/user/'. $account->uid)); shouldn't have the leading /. Should be...

/**
 * Correct user page breadcrumbs.
 */
function realname_check_breadcrumbs($account) {
  $trail = array(l(t('Home'), ''));
  // If we are looking at someone other than the current user, fix the breadcrumb.
  if ($account->uid != $GLOBALS['user']->uid) {
    $trail[] = decode_entities(l($account->realname, 'user/'. $account->uid));
  }
  $trail = drupal_set_breadcrumb($trail);
}
siliconmeadow’s picture

I tested this with 6.x-1.3 and it had no effect on the user's breadcrumbs. It would appear at first glance that the "/" which precedes the user/ part of the decode_entities call shouldn't have been there. Strangely, having the code with or without the preceding "/" has no effect on the breadcrumbs, as far as I can see.

Actually, on quick reflection, the breadcrumbs here are not for the blog, but for the user's account. Are they not?

This "fix" has been rolled into the -dev version already.

I've added the custom_breadcrumbs module to solve my problem (both 6.x-1.5 and 6.x-2.0-rc1 do the trick), and as much as I'd like to figure out why realname isn't being honoured on the breadcrumb of the user's blog, I've got to move on.

dave reid’s picture

Status: Needs review » Fixed

Marking as fixed as per #5.

Status: Fixed » Closed (fixed)

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

chules’s picture

Priority: Normal » Major

I am having the same issue trying to get realnames working on my blog pages breadcrumbs. I am using drupal commons and can not show usernames anywhere on the site. It must use real name as the username should be known to just the user and not publically visible.

I currently see this home >> blogs >> username

I want to see this home >> blogs >> realname

I am using the realname module version 6.x-1.x-dev and just installed the custom breadcrumb module 6.x-2.x-dev version.

I am not sure what to put in the titles and paths sections of the breadcrumb module and looking for some assistance as I am new to this module.

Thank you - chules

siliconmeadow’s picture

chule's comment above is being dealt with here: #912462: Add Real Names support to Drupal Commons

Please refrain from adding further comments to this issue. If you feel you are experiencing what this issue appears to address, please open a new issue.