Closed (fixed)
Project:
Real Name
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Mar 2010 at 21:38 UTC
Updated:
9 Mar 2011 at 10:41 UTC
Jump to comment: Most recent file
Please see my image below. I read through the previous posts about this issue for previous versions, but the patches there don't seem to apply. Also, the ambiguous naming of this page is confusing. I call it the profile page, because it shows a user's profile. Some people are calling it the "my account page." It's URL on my site is: http://mysite.com/drupal/users/davidbessler
Real Name is working everywhere else on my site just fine. Can you help me?
| Comment | File | Size | Author |
|---|---|---|---|
| #41 | Username in Profile Page Title.png | 48.57 KB | roball |
| #34 | realname_user_title_735436.patch | 1.08 KB | WorldFallz |
| #30 | realname.user_title.patch | 1.21 KB | franz |
| #28 | 735436_realname-page-title.patch | 920 bytes | matason |
| #25 | user-profile.tpl_.php_.txt (Rename this to "user-profile.tpl.php" and throw it in your theme dir) | 2.01 KB | monotaga |
Comments
Comment #1
YK85 commentedsubscribing
Comment #2
chules commentedDave,
I was one of the people who posted the same issue several times. I never got any response and am still trying to figure it out and also why an issue like this that many have posted goes unanswered. I suspect that there is something you need to do with the template. I have also seen that several other modules have similar issues. For example, if you install facebook style statuses you will see the same thing.
If anyone is willing to find out why this issue is happening with realname and is willing to create a fix and post a comprehensive howto doc for the community I am willing to fund this. You can email me at gitotech@gmail.com
Thank you - chules
Comment #3
j0nathan commentedDuplicate of? #601134: Pattern Does Not Affect Display of Real Name on User Profile
Comment #4
davidbessler commentedDon't think so. That problem seems to deal with the formatting of the RealName. Our problem is that RealName doesn't show up at all on the /user page. Instead, the Username (not the Realname) shows up as the title on my user profile pages (or My Account pages , or /user, or whatever you want t call it).
Comment #5
YK85 commentedas per above
Comment #6
j0nathan commentedSorry for having changed the status (duplication).
Comment #7
davidbessler commentedDoes anyone have this working? Interestingly enough, the Real Name displays under any of the subcategories in user/ for example, user/79/contact works fine. user/79/messages works fine ... the Real Name displays on all of those, but user/79, shows the username as the title. Can someone tell me where this page is built? I looked through all of the core user module files and couldn't find it.
Comment #8
nadams84 commentedLike many, I have come across the same problem and looking for the solution.
I also had another similar problem where the 'user/%/edit' page title in content profile was displaying the actual username and not the 'realname'. This was fixed by altering the 'drupal_set_title' function within the content profile code that was causing the problem. See the posts at: node/393518
I wonder if there is some similar code that sets the title for the 'user/%' page?
Fairly new to the drupal frame so any input appreciated, I'll be working on this week and will post any news.
Comment #9
nadams84 commentedHeadache
Comment #10
davidbessler commentedI still do not have a solution to this problem.
Comment #11
davidbessler commentedStill no solution
Comment #12
vishnu2010 commentedHi Drupalians,
Please help!, I am trying to include the email address of the user automatically in a html form, when he submit the content to the website. More specifically speaking I want to add a code which replaces with email address of the member who submits the form
eg: in the content type I will add a field with default data ; when the user submits the form It changes into user@website.com
Thanks
Vishnu
Comment #13
davidbessler commentedPlease remove #12 ... wrong thread.
Comment #14
davidbessler commentedI'm close to a solution. The title of that page is in page.tpl.php
In that file, it tests to see if the page is front page ($is_front) and sets the title one way. If not, it sets it to something else.
How do I test if the current page is the /users/# page?
Also, what do I replace $title with to get RealName?
Comment #15
davidbessler commentedYay!!! I cracked it!
in page.tpl.php
I used this:
Which basically means:
if we're on the front page, use
for the style of the title
otherwise, if we're on a user page (where the url is .../users/somebody's username), change the title to the realname for that account
Otherwise if it's not the front page nor is it a user page, leave the title alone.
Kapish?
Comment #16
jumoke commenteddavidbessler, thanks for sharing your nice snippet. It really helped :)
Comment #17
cboyden commentedIs there a way to do this in a preprocess function? I'd like to change $head_title as well without redoing what theme.inc does to set it.
Comment #18
gmclelland commentedsubscribing
Comment #19
Hanscraft commentedThanks! This worked for me! I'm using Acquia Slate 3x and I added your lines to line 114 to 138 (actually I commented out the original title line which was the original line 114). The name is now acting as a link which is annoying, but I'm willing to have that on the site for the time being!
Comment #20
Hanscraft commentedI just found out though that using your hack makes it so the user's RealName doesn't show up on the edit page. :-( It shows as "Guest." It's also showing up as Guest in the track and contact pages!
This is what I have added and commented out in my code.
Comment #21
plan9 commentedGreat work!
I've got this working now with your hacks - although other modules which provide tabs, in my case: fbconnect and twitter, still show the user name as 'Guest'.
How can I fix this? It's a bit worrying for users to see this!
Comment #22
Hanscraft commentedThis hack has stopped working apparently. See here: http://www.lisuncg.net/icl/users/norma-jean where "Guest" is printed instead of the Realname of "Norma Jean." Please help!
Comment #23
plan9 commentedI'm seeing 'Norma Jean'.
Comment #24
royger commentedI'm having the same problem, also the Breadcum is always showing something like "Home > My Account > username", when it should be displaying "Home > username", because I'm not inside My Account, and the proposed fix always displays RealName but with a link, which I think is unnecessary.
If I recall correctly, RealName was one of the first modules I installed, and before installing LDAP Auth, Views, CCK and Panels it used to work correctly, so my guess is that one of this is making RealName behave incorrectly.
Comment #25
monotaga commentedAdding
to your theme's user-profile.tpl.php file (you can just copy it from the core user.module) does the trick on RealName version 1.3.
Comment #26
plan9 commented@Hanscraft : did you find a fix for 'guest' showing up on the edit pages?
Comment #27
plan9 commentedThe problem with titling all user pages with a realname is that some user pages are expecting a uid of 0 or do not support realname and so default to the site config anonymous poster name - example user registration / login pages.
I've managed to at least change the word 'Guest' to 'Your Account' by adding another if statement:
The string 'Your Account' works quite well as a coverall phrase both on login / registration and on User profile page tabs where contributed modules do not support realname.
Comment #28
matason commentedI think there are at least two problems that are causing this issue:
1) The function that generates the page content when you visit /user/? is normally user_view() in user module, realname module implements hook_menu_alter() and overrides this callback so that its own function, realname_user_view() is called instead - user_view() calls drupal_set_title() however realname_user_view() doesn't.
2) In the helper function _realname_make_name() a file called "realname_content_profile.inc" is included, this file contains the function content_profile_load_profile(), a little further on in the code module_invoke($module, 'load_profile', $account, $type) is called with the intention (I assume) of calling content_profile_load_profile() in the previously included file however module_invoke() is looking for that function in the content_profile module only and it doesn't exist so therefore nothing happens.
I've addressed these two problems in the attached patch which against 6.x-1.3, I'd appreciate if this patch can be tested, see if it fixes things for you :)
Comment #29
bramley commentedThis works for me. Realname now showing.
I'm using realname for the title of a content profile. Title on user/* pages weren't showing at all before, now realname shows.
Thanks matason.
Comment #30
franzThis doesn't work for me, because realname doesn't not always steal user_view. I added a few lines that place the drupal_set_title into hook_user, thus ensuring the correct title. It worked for me so on
Comment #31
royger commentedThanks for the patch, it fixes most of my issues. I still have one, when a user is logged in and checks another user profile, the breadcum shows "Home > My Account > User realname", when it should display "Home > User realname". It only happens in the view, if I click on "Edit", the breadcum shows correctly.
Comment #32
franzI think that's another issue, look for it in the list or create a new one.
I think this could be RTBC, IMHO
Comment #33
WorldFallz commentedYep rtbc -- i can also confirm it fixes the problem.
Comment #34
WorldFallz commentedAnd here's a reroll against the current dev.
Comment #35
dave reidI committed the addition to realname_user_view() since that matches the core behavior of using drupal_set_title(). I left out the change to realname_user('view') because that shouldn't be necessary for the module to work since core does not use drupal_set_title() there, so I'm also going to consider this fixed.
http://drupal.org/cvs?commit=442266
Comment #36
roball commentedHm, just upgraded to the latest 6.x-1.x-dev (2010-Oct-27) but still have the username as the title of user/[UID] pages. Am I missing something?
Comment #37
nancydru-dev rolls out at Noon and Midnight GMT (or 8 am and 8pm ET), so this commit hasn't rolled up quite yet.
Comment #38
roball commentedYes, and the fix had been committed at 06:37 on October 27, 2010 (leading to realname.module 1.4.4.61). The dev rolled out around 14:00 on the same day and included realname.module 1.4.4.64.
Comment #39
dave reidIf you're using Content Profile, I just checked in a change to support overriding the title of the profile edit page.
http://drupal.org/cvs?commit=442866
Also, you have to make sure to rebuild your menus after updating (you can do this using admin_menu, or by running update.php).
Comment #41
roball commentedSorry to say, but I still have this issue with the latest 6.x-1.x-dev (2010-Nov-02), as shown in the attached screenshot.
Comment #42
g000fy commentedThe latest dev version works like charm! Thanks Dave.
In addition to content profile tabs, I was also facing issues with facebook tab (facebook connect). I resolve the issue using the same approach that was used to resolve content profile issue. In this case, in realname.module, I intercepted function 'fbconnect_user_identities' (originally in fbconnect.pages.inc).
Here are the changes I did to realname.module:
Added a line case 'fbconnect_user_identities': after case 'content_profile_page_edit'::
and then added the following function:
Comment #43
runner-up commentedI also still have the same issue with the latest dev
Comment #44
independent commentedme too, but #25 fix it.
Comment #45
runner-up commentedhow should I apply #25 if I dont have user-profile.tpl.php on my theme?
Comment #46
andreiianusco commentedsame here. What if I don't have user-profile.tpl.php in my theme directory?
Thank you,
Andrei
Comment #47
independent commentedcreate one: http://drupal.org/node/35728
user-profile.tpl.php
Comment #48
runner-up commentedYes, it works. Thanks you!
Comment #49
andreiianusco commentedIt works. thanks a lot!
Andrei
Comment #50
roball commentedThis finally works for me with RealName 6.x-1.4.