Postponed (maintainer needs more info)
Project:
Content Profile
Version:
6.x-1.x-dev
Component:
Base module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Mar 2009 at 21:47 UTC
Updated:
18 May 2010 at 12:26 UTC
Jump to comment: Most recent file
Comments
Comment #1
fagoI do think it's necessary.
Comment #2
nancydruI commented it out and everything works correctly.
Comment #3
chules commentedwhere do you find this code to comment out? Is it in the content profile module
thank you - chules
Comment #4
nancydruIt is shown above.
Comment #5
chules commentedI meant what is the path and name of the file where this code exists? I am new to Drupal and still trying to figure my way around.
Thank you - Chules
Comment #6
nancydruThe path depends on where you store your modules. For me it is
sites/all/modules/content_profile.moduleComment #7
brad.bulger commentedi am not sure why this line is necessary - without it, the page title is the user's name when editing someone else's profile and "My Account" when editing one's own, which seems correct to me.
but if you won't remove it, we can at least fix it to use theme(realname)
Comment #8
Bilmar commented+1 subscribing - using theme username would be great.
Comment #9
YK85 commentedsetting status for #7 to rbtc
thank you
Comment #10
xjmTracking.
Edit: +1, #7 resolves the issue for me.
Comment #11
xjmBetter title.
Comment #12
fagoWhat's that
array('plain' => true)for? First off the coding style says TRUE is uppercase, then theme_username doesn't have any options?In general, +1 for using theme_username there too.
Comment #13
nancydruIf RealName is installed, that will result in the correct real name value being generated without a link. That was the original idea in the core issue discussion. Unfortunately, after I implemented that idea, they decided to take D7 in a different direction. This would work fine if RealName is installed, but if not, then you will end up with a link to the user page for that user. In this case something more like
$name = isset($user->realname) ? $user->realname : $user->name;might work better.Comment #14
brad.bulger commentedthis came up in another module as well. yes, that patch is too specific to RealName for general purposes.
i am not sure how to apply your suggestion about setting the value of $name, though. i don't see where that would be happening?
for this drupal_set_title() call, i guess, pass it through strip_tags()? it seems wrong to be making a link and then tossing it but i haven't figured out a better approach. what i mean is to do
Comment #15
nancydruComment #16
xjmHere's a rerolled patch using NancyDru's code snippet in #15.
Works for me. Of course, we lose the flexibility of using the theme function.
Comment #17
xjmEh, I really think there's a better solution out there that's more generalized, so setting it back to "needs work." Short of providing our own theme override (which seems to defeat the purpose...), the
striptags(theme('username'));is the best I can think of.I don't know why #7 works (rendering a plaintext username in the title instead of one with escaped tags), but it does.
Thankfully D7 supplies richer options for username theming.
Comment #18
fagoWell actually I looked up why this call is necessary at all and it is so that the title stays when the user account edit integration is used - as the core user module also uses "drupal_set_title(check_plain($account->name));" on those pages.
Thus the question now is, how does the realname module alter the title on the other user/X/edit/ pages? Perhaps we can do it the same way here?
striptags(theme('username'))- brr, I'd really like to avoid something like that. In particular as core uses "drupal_set_title(check_plain($account->name));" too.Comment #19
nancydruAs I stated in the original post, I don't think a drupal_set_title is needed here at all. The user module will set a default (poorly), and then RealName can fix it (hook_menu_alter). That is the simplest and most general solution. Take that line out and test it.
Comment #20
robby.smith commentedsubscribing
Comment #21
paskainos commentedsubscribing
Comment #22
fagoI tested it on the user/X/edit/profile page, but without the line the title was different?
Comment #23
nancydruDifferent how? And was it unusable?
Comment #24
bramley commentedsubscribing