With most recent -dev release, all those little bugs were patched, but we got a new one...
Now, when going to a node, the page title which displays at the top of the browser window is correct, but the node title which displays on the page is no longer the content title, but is instead the Real Name of the currently logged-in user.
While it's somewhat amusing to have my name at the top of every node, it's not the most ideal feature.
| Comment | File | Size | Author |
|---|---|---|---|
| #59 | realname_6x_04.patch | 1.95 KB | nancydru |
| #46 | 378938_2009-Feb-28.patch | 1.26 KB | roball |
| #30 | 378938_2009-Feb-27.patch | 647 bytes | roball |
| #21 | 378938-2.patch | 2.76 KB | roball |
| #3 | 378938.patch | 2.63 KB | roball |
Comments
Comment #1
roball commentedCan confirm this bug. Subscribing to this issue.
Comment #2
stopbox commentedAlso subscribing, I have the same problem.
Comment #3
roball commentedThe attached patch against the latest 6.x dev version fixes the problem for me.
I have removed the "My account..." option because it is not needed anymore: The module now behaves exactly as Drupal without this module enabled - only with the username replaced by the realname. In the navigation menu, the link to the user profile page is always labeled "My account" (as in pure Drupal). Within the user profile pages, the title of the page is the realname (pure Drupal would display the username there). The original version did not distinguish between these two cases.
Comment #4
roball commentedComment #5
stopbox commented#3 Works for me. Thanks.
Comment #6
snorkers commentedHad spent a whole day deep in my Theme wondering where the text 'My Account' had appeared from in $title... now I know. Just feel a little seen off that my name wasn't in lights on every page.
Comment #7
Equ commentedWhen is the next -dev release?
Comment #8
nancydruDev releases get created every time I commit changes.
@roball: "My account" is now a setting. You may turn it off if you don't like it.
Comment #9
nancydruWith which themes are you seeing this behavior? My D6 development site is using Garland and it is not doing this for me.
Comment #10
roball commentedNancy,
I'm using the "Pixture Reloaded" theme (http://drupal.org/project/pixture_reloaded). Now working fine with my patch posted above.
Comment #11
Equ commentedI'm having this issue with Framework theme.
Comment #12
roball commentedEqu, did you try my patch?
Comment #13
snorkers commentedI first noticed it in my own custom (Zen-based) theme... but tried it in Garland too - and $title is changed to 'My account' on every page. I haven't tried the patch yet, but disabling Realname module restored $title to its expected value.
Comment #14
bobgeier commentedBug confirmed on Garland, Marinelli, Pixture Reloaded, Aquia Marina. It's not theme-based.
When accessing the site as an anonymous user, realname performs just grand. Logged in as any role of authenticated user and you get the user's realname (or "My account" depending on the setting) as the node title on every page.
Tried the patch briefly but must have keyed it in wrong and got phperroredwhitescreenofdoom. :) Mean to get back to it but haven't had a chance yet.
Comment #15
Equ commentedRoball,
no, I didn't. I'm waiting for the next dev release.
Comment #16
roball commentedbobgeier, my patch is against the latest current dev release (CSV version 1.4.4.34 of "realname.module") and meant to be applied from Drupal's home directory (referred to as "/path_to_your/drupal" below - may be something like "/var/www/drupal"). So here are the commands to execute it properly:
Comment #17
nancydruI am trying to figure out how to rework the patch because I like the "My account" option, although I agree that it may not be the best title (possibly it should be a setting).
Comment #18
bobgeier commentedThanks, roball! The patch works for me, though the profile page (/user/#) of the currently logged on user displays a node title of "My Account" rather than real name. Nancy likes that, I think, though I'd prefer the option to shut it off and just use realname. I'd vote for that if it's possible to add, but it's honestly a minor issue.
Comment #19
roball commentedI guess Nancy is currently working on that and she will probably release it in her next dev version soon.
Comment #20
roball commentedComment #21
roball commentedbobgeier, until Nancy publishes her new dev version, you may want to use the attached patch (http://drupal.org/files/378938-2.patch) instead. It always displays the real name instead of "My Account" on the expected places.
Comment #22
nancydru@bobgeier: There is an option to turn it off. It's on the settings page. However, I am about to change it so that you can enter whatever text you want for the title.
Comment #23
nancydru@roball: I only intercept the title when the menu path is "user/%user_uid_optional" how can that possibly be affecting "node/%node"? I believe you that you are seeing something like this, but I cannot see how RealName is causing it; certainly it is not happening on my sites.
Comment #24
roball commentedNancy, it's because you are executing
drupal_set_title(check_plain($name))on each and every page.When you will add this option, what about the possibility to use a placeholder for the real name in the custom text - something like "!realname's account"?
Comment #25
nancydruWhere am I doing that? The only places I should be setting the title is on the user pages. Which release of Drupal are you using?
Comment #26
roball commentedHere. I am using D6.9 and will update to 6.10 tonight.
Comment #27
nancydruThat is in the user page title code and should not affect any node pages unless some other module is messing with the menu.
Comment #28
avpadernoThe code is not changing the
$node->titleproperty, nor it's calling any Drupal functions that change it.Comment #29
nancydru@roball: The original on/off setting has been there for some time. The new version will be rolled up this evening, but has already been committed if you are using a check out.
Comment #30
roball commentedAs I have reported repeatedly, the
drupal_set_title(check_plain($name))*is* in fact the bad part of code that is causing writing the username on each and every page's title, still in the new dev version 6.x-1.x-dev (2009-Feb-27). The attached patch against this latest version just removes that line of code and the problem will be gone.Comment #31
nancydruAnd, as I have repeatedly said, this is NOT happening on any of my sites. Further, that code is specific to "user/%user_uid_optional" so if it is firing elsewhere on your site, I need to know why before I possibly break someone else's site.
With that line removed, the "My account" feature does not work; the breadcrumb updates, but the page title does not.
Comment #32
roball commentedI cannot say why that line of code changes the title on all of my pages, but it definitely does - and as you can read in this thread, I am not the only one being affected. Others already turned out that it is independent of the used theme, and it happens also with the latest Drupal core.
I have posted a solution in my first patch above that does not break any existing site nor the "My account" feature.
Comment #33
avpadernoIf you don't know if any other module is messing with the menu router, why do you keep to think the bug is in this module?
The fact somebody else using the same module doesn't have the same issue you have shows that the issue is not in the module, otherwise all people would see the same issue you have.
Like reported by the maintainer, the function you are referring is called in a menu callback associated to user/%user_uid_optional; it cannot be called on node pages, which have a menu path matching node/%node.
Finally, the patch (reviewed & tested by the community) status should not set by who submitted the patch.
Comment #34
roball commentedFor me it does not play a role if the original source of this problem was caused by another module or by this one, as long as I have a working solution. Until v1.4.4.32 there was no problem. While no changes have been made to the other modules, the problem began to arise with v1.4.4.33, which introduced
drupal_set_title(check_plain($name)), as part of the commit labeled as Make "My account" an option.Commenting out that new line still introduced the "My account" option, so I can't see the relationship of this code line to the mentioned change. But it fixed the new problem for me. In the patch I submitted first, I am still using that function, but in a way where I don't have the problem, while still trying not to break its functionality if there is any. The next code change has been committed without a chance to be tested by users affected by the problem (including me) - so it's now again in the official dev version. There is nothing more I could imagine to do now. I have a working solution, but you don't seem to accept it. If your problem is this issue being reported as "bug report", you may feel better to read it as "workaround" - but this category does not exist to choose from.
Comment #35
nancydruI understand your frustration; I am frustrated by this as well. Please bear in mind that while you have one user to make happy (yourself), I have over 600 users of this module. I may very well have to remove the "My account" option, but it would make a big difference if I could reproduce this so I could find out why pages that have no business being in this code are there.
Actually, you gave me a hint in your last post. I am not on the latest core because 6.8 complained about a problem with one of the cache tables. I need to try the latest again and see if it is fixed or I can fix it somehow. Perhaps the problem is actually caused by a release newer than my 6.6. Remember that the bulk of the most recent changes that caused all this is the result of trying to bypass core bugs. So I'm going to concentrate on getting up to the current core version.
Comment #36
avpadernoI notice the same problem on Drupal 6.9. All the pages have the title set to the name of the user currently logged in.
Comment #37
nancydruI believe that you both are seeing this. I just upgraded to 6.10 and still cannot reproduce it. However I still see that removing that line of code causes the titles on the user pages to be incorrect.
Comment #38
avpadernoCan the issue be caused by some Drupal settings? Could be it caused by the use of the cache?
I installed the module on a test site that uses just Drupal core modules, so it cannot be caused by the interference with third party modules.
Comment #39
roball commentedKiam@avpnet, now you say
but 5 posts above you just said
So what?
Comment #40
silkyD commentedI was having exactly the problem described by Roball and his patch at #30 fixed it. User page titles are correct, and the rest of the pages have their correct titles as well. I'm using 6.9 and a Zen subtheme.
NOTE: Sorry, I should have been more specific: The issue was that the name of the logged in user was displaying as the page title and node title on each and every page. Commenting out the line 'drupal_set_title(check_plain($name));' in the 'realname_user_page_title' function as described in Roball's patch negated the problem.
Comment #41
nancydru@silkyD: If you are using the "My account" option, they are not correct, but your breadcrumbs will be (try a slightly different string).
@Kiam@avpnet.org: Hmm, interesting. My test site is close to a vanilla site.
@roball: Do you know how to do tracing? I'd like to know how the user_page_title code is being entered from a node page.
Comment #42
avpaderno@#39: I was referring to the maintainer of the project, not to me. I was simply saying that, as there is somebody who doesn't have the issue you are describing, you should give more informations to resolve the issue.
To verify if the problem was really caused by the module, I installed it on a test site where there are just Drupal core modules installed.
Comment #43
snorkers commentedThere are probably many lurkers on this issue who may be staying quiet.
I've had Realname running latest DEV for a while and have 'My account' on every page title. Just upgraded to D6.10 and problem still there.
In absence of being able to contribute much to debugging (not really experienced in PHP/modules), I would say it's more important to remedy the erroneous page titles than have 'My account' on my account page. It's a really nice feature, but just not as important. So if it's turning out to be a real problem to track down, then just allow the feature to either be disabled, or drop it (iaw the patch @#30)
If I could help more, I would, but for the moment Realname has to - unfortunately - stay disabled in my currently-underway site :-(
Comment #44
nancydruIt has been removed.
Comment #45
roball commentedNew dev version (realname.module 1.4.4.36) has introduced a new critical bug: now nothing is displayed at all for the own user pages. Nancy, why don't you give us a chance to test your changes *before* committing them?
Comment #46
roball commentedAnd here is the patch against version 6.x-1.x-dev (2009-Feb-28) that fixes the newest bug. This actually brings us back where we already could have been with my patch at http://drupal.org/node/375692#comment-1263014
Comment #47
vm commentedmarked http://drupal.org/node/386814 as a duplicate of this issue
Comment #48
nancydruThere is no variable named 'realname_myacct' any more. That code was removed from the admin function.
And, once again, this is not happening on my sites.
Comment #49
roball commentedNancy, we know this - you should really have a look into my latest patch and apply it asap. Otherwise, probably 599 of your users can't use your module.
Comment #50
nancydruYour patch uses that variable. What I did was to remove the setting and the two places it was used and removed the drupal_set_title. Without the title change, the "My account" feature did not work, so I removed it.
You can apply for CVS access and I will give you this module.
Comment #51
lomz commentedSubscribing.
Comment #52
bobgeier commentedEasy, folks.
NancyDru & roball, we all appreciate your work on this.
I'm not experienced enough with pHp to try to figure out where things are leaking. I can say that roball's patch in #21 seems to make the module fully functional for me in Drupal 6.9 with the Content Profile module, so I'm staying with that for now :). Like a few others, I can help with some testing in various modes; it would be nice to get these kinks worked out and have a fully-functional release.
Kiam, I wasn't clear... were you saying you WERE able to duplicate the problem on a clean site, or not? If not, I'm wondering if there's a connection with Content Profile.module, which does at some level link node and user (?)
Comment #53
avpadernoI am sorry if I didn't understand what you meant.
I don't have Content profile on my test site, but I have Devel; I also noticed the problem of having the title of all pages being changed the name of the user browsing through Drupal pages.
I don't understand why this happens, as the code of the module seems to correctly set the title only for user pages.
I also find quietly strange that the behavior appears in some sites, and not in others.
Comment #54
nancydru@bobgeier: You can't just look at the title. You need to hover over the title and breadcrumbs to see if they are right. When I went with just removing the drupal_set_title, the breadcrumbs were wrong. That's when I removed all of the "My account" feature. Without that, the breadcrumbs are right and the title is right - at least on all my sites.
Comment #55
NickSI commentedIt seems that I've found the source of the problem roball has been trying to fix with his patch. If you look on the code responcible for altering user page menu item
you'll see that in the latest dev release $name variable which should contain either user name of 'My Profile' words left unitialized in latter case (row 5). I think the best way will be to replace commented line with $name = user_page_title($account) in order to use default title from users.module
Comment #56
lomz commentedAfter that changed the "My account" on top of Navigation-menu disappeared, just leaving the
-dot alone.
Comment #57
roball commentedYes NickSI - you seem to really got a look into my patch. Actually I just corrected the wrong commenting of Nancy's last commit in my last patch. Her result still reads
which I simply corrected to
That's all - and I am *not* using the variable mentioned by Nancy in #50. The problem now is that "removed" code got into CVS without checking to be correct and then my patch has not been reviewed properly...
Comment #58
nancydru@NickSI: Thanks, but the main reason why this function exists is because the one you suggest doesn't work.
@roball: Here's part of what I see in your patch:
That says to replace the commented "$myacct" with the uncommented, thus trying to get a variable that no longer exists.
And yes, I did test the code before I committed it. It works correctly on my sites, but then I wasn't seeing the problem that was initially reported here either (and which is still unexplained).
I would prefer that we stop being adversarial here.
Comment #59
nancydruTry the attached patch, please.
Comment #60
roball commentedNancy, isn't
obviously a bug? What I did is actually repairing the above to something like
- nothing else. The relevant cited part of the patch must be continued until the line
so you finally get
Do you see it now what I really did?
Comment #61
nancydruOkay, I read it wrong (life has been very hectic lately). I think we've ended up in the same place, except I've removed the commented code.
Comment #62
nancydruComment #63
roball commentedThank you Nancy for your continued effort. The latest dev version (realname.module v1.4.4.37) works fine for me :-)
Comment #64
nancydruFabulous. Thanks for the update. I don't suppose you've tested #385126: Cache user_load or do something smaller...?
Comment #65
joostvdl commentedThe link in Navigation Block is in the latest dev release still set to the Realname and not to the text: My Account. How can I change it back to the default Setting because this is nog logical I think because clicking on your own name to go to the My Account page is confusing for users.
Comment #66
joostvdl commentedComment #67
vm commentedcouldn't you just create a new MyAccount link and point it to the /user/ path ?
Comment #68
roball commented+1 for #67
Comment #69
nancydruStrange coincidence... I was working on a new site and saw an entry in the menu with my name. Yes, it turned out to be the "My account" entry. Just to see, I went to my test site - using the exact same code base and same PC - and it is not happening there. Very curious!
My experience with users click on "My account" is that they don't.
On this site I am using the theme override on the Navigation block, which give them the equivalent of "My account" at the top of the block, so I just deleted the "My account" link.
Comment #70
nancydruWell, at the risk of breaking roball's site again, I committed a fix.
Comment #71
roball commentedIt didn't break anything for me this time :-) However, the latest commit acts like a downgrade of functionality for me, since I preferred to see the real name instead of a fixed string, just as it is done by other CMSes we use, such as Moodle. Would you care to make this optional again (but without the problem we had last time)?
Thanks.
Comment #72
nancydruAre you talking about on just user page or the menu item too?
Comment #73
roball commentedI only meant the link's title in the menu.
Comment #74
nancydruCommitted
Comment #75
roball commentedEverything works fine for me this time! Thanks Nancy.
Comment #76
nancydruFabulous
Comment #77
roball commentedDo you think time is now ready to roll out a new release?
Comment #78
nancydruComment #79
andrenoronha commentedI use RealName 6.x-1.2...
will this patch come as default in a soon-to-come release?
Comment #80
nancydruIt's already in 1.2.
Comment #81
andrenoronha commentedOK...
i got this problem: the admin users and the users created by an admin user have their realname at the HTML page title...
but the new users that have created their own account have no page title... it shows only "[the name of the site] - -"
I created a role for users that havent yet atenticated themselves by the email sent to them...
is there any problem about the atentication of the new users that's making them not truely registered users?
I use logintoboggan btw...
Comment #82
ingopingo commentedsubscribing
same problems (username - not real name - appears on any teaser title) with acquia prosper. The title of the full node works as normal.
Comment #83
roball commented@ingopingo: You are describing another problem that is not related to this one (which has already been solved).
Comment #84
ingopingo commentedHi,
my problem is already solved? I've searched but not found anything similar...
Could ypu point me to the thread, please?
Comment #85
roball commentedPlease read carefully and think before writing wrong things into wrong places.