Thu, September 8, 2005
Comments Bug—5:09 PM
A number of readers noticed that when submitting new comments, there is an inconsistency in the display of personal information (name, e-mail address). When first posting the comment, the login may be displayed instead of the "Public Name," and the e-mail may be displayed improperly according to the user's "show my e-mail with my comments" preference. Some users brought this problem to my attention using the onebee comments; others were more discreet, and mentioned it over the phone. (Thanks, Mom.)
First, let me be clear that this inconsistency is only visible to the user at the time of the comment. Your information is not being displayed improperly to the world at large. It is not being stored improperly in the database. It is only a matter of the comment view being displayed back to you at the time of your posting – as soon as you reload the page it will look right, which is how it will always look to any other viewer of the site.
Second, I think I fixed it.
As I detailed in the comments, the issue arose from the fact that there are two ways comments are displayed on onebee: from the POST variables (the data that you send to the site when submitting a comment form), or from the database. Comments are displayed from the database in every case except for the comment-you-just-posted-it-as-you're-first-posting-it situation described above.
The reason they're displayed from the POST variables in that case is that it enables comment previewing, which is a glorious new feature that as you know has been added to this site at the behest of some whiny malcontents. Previewed comments must not be stored in the database, because the whole point is that the person may revise them or decide not to post them altogether. So, they're displayed from the POST variables, and it made good sense to do the same with posted (i.e., not previewed) comments as well, so that's why there are two ways that comments are displayed.
Why they were displayed inconsistently is a slightly more complex story. In the old days, far before most of you remember, there were no comments on onebee. (!) There wasn't even a onebee: it was pH7media.com, and the entire purpose of the login was to drive community and search-personalization features at the Starting Point, an outdated and unpublicized vestige of pH7media's early years – which would've fallen victim to the "kill it" side of the re-bee "Fix it or kill it" mantra, except that it's Mom's start page in Safari and I didn't want to disrupt that. So I created a special third case just for the Starting Point: "leave it."
Anyway, in those days you had this thing called a "community profile" and you could decide whether or not to display information about you (like your name, your e-mail address, your birthday, your location, your AIM screen name, etc.) as part of that profile. Preferences were stored in the database under fields like "showname" and "showemail". The community profile is now long dead, but the old preferences are still in the database because there's never been a reason to change them.
During the re-bee, when I was coding some of the comments displays, I cut-n-pasted code from the previous onebee comments code because the functionality was the same. In other areas, and in the code for the the cookie-based login, I created new code from scratch. And in those cases, I just looked at the database, found the fields I needed, and put them in the code. Problem is, the fields for the preferences should be "pubnameshow" and "commentsshow" but I saw "showname" and "showemail" and figured those were the ones, and put them in the code.
I would have discovered this problem earlier, but for my profile, all of these prefs are on. As I've mentioned before, I'm a giant idiot: I test the site primarily while logged in as myself, or occasionally not logged in at all. I have other test logins, but I forget to use them during the QA process. For some of you, the "showemail" (wrong) pref was off, but the "commentsshow" (right) pref was on, and thus: inconsistency.
Now, that's all been corrected. The presentation of your information will now be consistent in any situation, because it will be consistent with the preferences you set on the Edit Profile page. You can specify whether to display your e-mail address using the checkbox, and you can specify whether to display your Public Name by entering a Public Name. ("pubnameshow" is now always on; there's no checkbox. The site displays your Public Name if you have one, or your login if not.) If displayed, your e-mail is always encoded to prevent against spambot harvesting. There are no guarantees, but we do what we can.
From now on, you shouldn't experience the comment bug again. (If you do, try logging out and back in – I hate to place the onus on the user here, but that'll quickly reset your preferences to the correct values, so it's the easiest fix.) Keep me posted if you have any trouble, and continue enjoying the new site!
(For OmniWeb users experiencing login problems – I'm still determining why OmniWeb rejects my Ajax code; you can login at onebee.com/account/login/ in the meantime.)