I just noticed that older post comments on my brand new CS 2.0 blog listed "Dave Burke" as the author of each and every comment. It appeared as either psychotic or egotistical, but was embarrassing to be sure. I figured I screwed something up when I moded CS 2.0 to display my name instead of my username in comments, but that wasn't it. More debugging determined that the Entry object Display Name was good, so it was time to head to the database and the cs_posts table.
And there she blew! "daveburke" and my userID (1002) was recorded for all old comments. Man, oh man! Data corruption from one too many CS upgrades. I checked the same posts from my archived CS 1.1 site and they looked good, so it was the CS 2.0 upgrade that hosed my old comment anonymous usernames.
Here's some query aid that fixed it for me.
To investigate what your hosed comment numbers look like, use
select postID, postauthor, userID, sectionID, postlevel, subject, propertynames, propertyvalues, postdate from cs_posts where
sectionID = 5 and postlevel = 2 and propertynames like 'SubmittedUser%'
and postauthor = 'daveburke' and (propertyvalues not like 'Dave Burke%'
and propertyvalues not like 'daveburke%')I'm not sure if the sectionID varies from site to site, so you might need to modify that--as well as the 'Dave Burke/daveburke%' strings, of course.
Then to fix
update cs_posts set postauthor = 'Anonymous' , userID = 1001 where
sectionID = 5 and postlevel = 2 and propertynames like 'SubmittedUser%'
and postauthor = 'daveburke' and (propertyvalues not like 'Dave Burke%'
and propertyvalues not like 'daveburke%')Like I said, confirm your own variations, but this logic will do ya.
After I came up with my own fix I was able to confirm that I wasn't alone in this, thanks to Curt Christianson
posting the bug on CS Forums. It seems from Curt's experience and a reply from Jayson Knight that the core of the issue had to do with migrating old .Text comment data to CS 2.0. That's going back a ways, so this comment postauthor hosing in the CS 2.0 upgrade script is easily forgiveable. btw, Jayson provided Curt with a different script than the one I used, so check that out on the Forums thread.
Sidenote: That Jayson Knight dude is
everywhere, isn't he? Damn!
[tags: Community Server, JaysonKnight]