Closed (outdated)
Project:
Real Name
Version:
6.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2009 at 12:51 UTC
Updated:
30 May 2016 at 21:13 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
afox commentedI just found out the same thing.
For me, the temporary fix was to comment out line 45 of the file realname_content_profile.inc
I tried to follow what this function (content_profile_load_profile) is doing, but really found no logic as to why it overrides only forum topics so far. It's being called around lines 755-767 in realname.module. This fix hasn't affected negatively anything on my site yet... so I'm good for now.
Comment #2
wretched sinner - saved by grace commentedI am getting the same thing with the Blog module and RealName 1.3. I haven't tried the suggested fix.
Comment #3
wretched sinner - saved by grace commentedAs confirmation, this also occurs in the latest -dev snapshot.
Comment #4
ayalon commentedI have the same issue. Only for logged in users that have a permission for realnames.
Comment #5
ayalon commentedI used the described fix and the forum is working again. But I think this is not a final solution.
Comment #6
darktygur-1 commentedThe line mentioned in comment #1 is definitely the source of the problem. RealName can potentially blast the title of anything a user could've authored because of it. According to #579040: Some bugfixes, it looks like it was an attempt to fix #487576: Pull RealName from node title (Content Profiles).
Comment #7
DrakeRemory commentedTry the patch #21 from #579040: Some bugfixes. Hopefully this helps.
Comment #8
wretched sinner - saved by grace commented@DrakeRemory - that doesn't solve my problem with Blog titles. All I get is a nicely HTML escaped title, instead of a non-HTML escaped title.
Comment #9
wxman commentedI don't know if mine is the same problem, or a different one. I did the #21 patch, on the most current dev. On my test forum, in the "Created" column, it now shows
<a href="/forums/...for the users name. It seems to be working fine elsewhere.Comment #10
alexpottJust spent an age trying to find out why this was happening on a site...
The reason this is happening is because template_preprocess_forum_submitted in forum.module calls theme_username which when taken over by realname eventually calls content_profile_load_profile in realname_content_profile.inc which unhelpfully overwirte the objects title with the node title - the line identified in #1 defintely is the cause. What I do not understand is why it is setting $account->title at all... surely it is supposed to be setting $account->name as this seems to be the point of realname!!!
Comment #11
keyinsight commentedsubscribe
Comment #12
fastballweb commentedWow, no one seems to be mentioning a long stressful ordeal just to discover that it was *this* module causing the problem, and not a forum-related one. Must have just been me then.
Thanks everyone, for discovering the bad line of code and thereby lowering my blood pressure to acceptable levels again.
Hopefully a slightly more specific title will make this easier to find in a search.
Comment #13
briandj62 commentedI have had the same problem these days and I can confirm that the simple patch in comment #1 fixes the problem fine.
Well, it took a lot of time for me too to discover that the problem was in the RealName module and **not** in the Forum module... but I am very glad that it can be fixed because RealName is really very very good.
Comment #14
alexpottHere's a patch to remove the line of code that's causing the problem.
Comment #15
njacobson commentedsubscribe
Comment #16
ayalon commentedI applied the patch again. It works and it is an issue!
Can this be committed please? Thanks
Comment #17
izmeez commentedsubscribing
Comment #18
davidbessler commentedI had the most bizarre problem. My forum topics in viewing a forum were all suddenly changed to the title of my most-recent content profile. I tried uninstalling all sorts of modules, flashing all sorts of caches, and updating my database. This patch seems to have fixed the problem.
Why was this line of code even there? What does it do? What effect will deleting it have?
Here's a screen capture:
Comment #19
davidbessler commentedSorry. Here's the screen capture.
Comment #20
clouisa commentedThis issue had been driving me crazy as well! This patch worked great for me and I agree with ayalon, this patch should be committed.
Comment #21
Bilmar commentedthanks for the great work
Comment #22
jthorson commentedI'm going to go out on a limb and guess that content_profile_load_profile should only be run for users and content_profile nodes ... I bypass the entire routine by putting this at the top (line 12ish?):
The routine still gets run for accounts that are passed to it ... I have no idea if it should or not, but assume from the $type=NULL argument that it can take both accounts and nodes. In any case, this addition seems to have worked for me for the moment ... and I get to keep my updated titles inside my content profile nodes. :)
Comment #23
robby.smith commentedany chance of commit to latest dev?
Comment #24
danepowell commentedWow... what a hellish journey it was to track down this bug... I'm glad I found this patch before pulling any more of my hair out. For me the problem was that RealName was overwriting Organic Groups block titles. I can confirm that the patch in #14 fixes the problem.
Comment #25
davisjan commentedThe patch in #22 also solves the problem, and perhaps is the more correct solution. Thanks, jthorson! I've attached a patch file.
Comment #26
mikeker commentedVerified the patch in #25 fixes the bug. Thanks, jthorson and davisjan.
+1 for getting this committed!
@Dane Powell, yeah, I'm with you on the hellish journey...
Comment #27
shenzhuxi commentedconfirmed
Comment #28
nancydruCommitted to 6.x-1.x-dev.
Comment #29
nancydruComment #31
patrickslee commentedI don't think you should commit the "fix" in #1. Actually that is not a fix. That line is there for a reason. Try this scenario:
1. Use content_profile as the source module.
2. Configure realname to use the title of content profile as real name.
3. Choose "Override username theme".
Now if you go to the content list, all content's author are replaced by the content's title if you have that one line commented out, except for the profile content type.
The patch in #25 does not fix this problem either because it is just trying to solve the problem from the same point of view.
A correct fix should consider the possibility that profile content title is used as the realname.
I hope this should give someone a correct idea to come up with a fix.
Comment #32
xjmThis issue's commit completely breaks realnames based on profile node titles. +1 that it needs work, and see: #876704: Realnames not properly calculated after upgrading to 6.x-1.x-dev (Content Profile/title field)
Comment #33
xjmSee also #748986: RealName overwriting Node->$title in teaser view. Might be related or a duplicate of this.
Comment #34
gappleFollowing up on patrickslee's comment 31.
Another way to show that the changes in 22/25 are not quite correct is with the forum module. While it fixes the problem with the forum topic title, the 'created by' information only uses the username, while the 'last reply' properly uses the realname.
This patch somewhat inverts the approach in 22/25.
Instead of exiting the function early if the given object is a not a content profile node, which doesn't replace the title properly if the object is, this patch only replaces the title if the given object is a content profile node.
I am still quite naive to the functionality of the rest of the function, so please test this patch thoroughly.
Comment #35
liliplanet commentedsubscribe, thx ...
Comment #36
gappleClosed #876704: Realnames not properly calculated after upgrading to 6.x-1.x-dev (Content Profile/title field) as a duplicate of this issue
Comment #37
gappleclosed #999248: realnames overidding ALL my node titles as a duplicate
Comment #38
gappleMy previous patch would prevent realnames from getting generated properly if the Content Profile title was used as part of the realname pattern, since the content profile title was not added to the user object (as required for
_realname_make_name())I think focusing on Content Profile is wrong, and that the title attribute should only be set for user objects passed to the function; node titles should never be touched.
In the following patch, the title attribute is only set on the passed account object if it is a user object (no nid attribute). Any nodes passed to the function, Content Profile node or not, will not have their title altered.
My only concern is that if a node object is passed in, the realname will then be improperly generated (since it may use the node's title, rather then the correct content profile title). My brief testing has not encountered any issues, but I would appreciate some extra eyes on this area. I don't think that a node should ever be passed in, so if any calls can be fixed this function may not need any modifications other than to uncomment the title assignment line.
Comment #39
verta commentedsubscribing
Comment #40
bnadem commentedThanks you for the great work !
It's working fine for me using patch #38
Comment #41
capellicThanks for the patch, gapple, #31. However this doesn't fix the problem in the forum when using the node title as the source of the real name. The username links that appear in the Created and Last Reply columns escape the HTML. And then it leaves the usernames unconverted on the discussion page.
I decided to go with patch #34 *AND* change the way that I am generating my real names -- no longer using the node title.
Comment #42
sdsheridan#38 seems to be working for me so far.
Shawn
Comment #43
gapple@capellic
As I noted in #38 with the newer patch, my previous patch in #34 doesn't work correctly with realnames that use the Content Profile title. Did you try the latest patch as well?
@sdsheridan, thank you for testing the latest patch.
--
My current implementations are a forum (with Advanced Forum) using Content Profile fields for the real name, and a views-based Blog using the CP title, so testing in other instances would be appreciated.
Comment #44
gappleclosed #748986: RealName overwriting Node->$title in teaser view as a duplicate of this issue.
Comment #45
xjm#38 resolves the issue for me as well.
Comment #46
anton.safin commentedThanks! #38 resolve my problem.
Comment #47
capellicI just did a compare with 1.5. The update has not yet been applied so you'll have to re-merge if you upgrade.
Comment #48
achtonThe patch in #38 works fine and applies perfectly to 1.5. It is nearing its' 2 year anniversary, so I hope someone can commit it soon!
Comment #49
grimal commented#38 works fine, please commit!
Comment #51
hass commented