WordPress Commenting Bug: Name Field Edition

If you have a non-alphanumeric character in your name, your comment goes into moderation.

After considerable time trying to figure out why a longtime commenter’s contributions were consistently going into the moderation queue, our IT guy finally figured it out:

Once there’s one approved comment from [someone with a given user name] in the system, future comments get published automatically.

The problem is the way that WP determines who a “new commenter” is. If the comment isn’t coming from a logged-in user, the way it does that is by taking the name and the email address the commenter provided, and then checking the comment database to see if there’s any approved comments in the system with that same name and email address. If it finds any, the new comment gets published; if it doesn’t, it goes into the moderation queue.

Normally that works fine, but in this case the name the commenter was providing (“Daryl’s other brother Darryl”) had an apostrophe in it, and apostrophes are special characters that need to be encoded before they’re passed in a database query. If they aren’t encoded properly, the database will register it as a syntax error and the query will fail every time, no matter how many approved comments are in the database with that same username and email address. So every time Darryl commented, WP thought he was a new commenter and plonked his comment into the moderation queue.

We’ve reached out to him a couple days back and he’s simply going to omit the apostrophe. Problem solved. The reason I’m posting this is that it’s just occurred to me that at least one other regular commenter (Just ‘nutha) has an apostrophe and there may be others that are in a similar boat I’m forgetting.

Jason has reached out to WordPress in hope this bug is fixed. In the meantime, word to the wise.

 

FILED UNDER: OTB History,
James Joyner
About James Joyner
James Joyner is Professor of Security Studies at Marine Corps University's Command and Staff College. He's a former Army officer and Desert Storm veteran. Views expressed here are his own. Follow James on Twitter @DrJJoyner.

Comments

  1. Just nutha ignint cracker says:

    Testing… testing…

    Still goes in the mod cue. Must be another reason (insert Troll emoji here).

  2. I approved your first comment using that username, so you should be okay going forward.

  3. Just nutha ignint cracker says:

    @Doug Mataconis: Thank you!

    Oops…

  4. Just nutha ignint cracker says:

    One more test.

    Aha! Previous test wen’t into mod because the school I’m at logs into Internet Explorer by default still (but I don’t know why).

    All is well. And thanks again!

  5. al-Ameda says:

    thanks for the heads up Doug, I will switch to ‘Alameda’

  6. CSK says:

    Mine still go into the moderation queue occasionally. Another thing: You have to refresh the page at least once to read all the comments. At least, that’s my experience. And, once you’ve logged in, you may stay logged in on that thread–not always–but if you comment for the first time on a new thread, you always have to type in your user name and email address. I’m using Firefox on all three or four devices, and various Windows operating systems.

    3
  7. Kylopod says:

    My main current issues, in descending order of importance:

    (1) Still gives an error message when I select preview.

    (2) Sends my comment to moderation whenever I have more than one link, and sometimes when I have just one link. The old system allowed me a maximum of two links per comment.

    (3) There is still the weird effect where after I load a page, I have to refresh it to see any recent updates; by default it seems to show me pages that are several minutes out of date.

    1
  8. teve tory says:

    That caching bug can be used to your advantage–go to the page and see that the top 10 posts have comment numbers
    1
    4
    7
    23
    2
    45
    7
    34
    21
    12,

    and then hit refresh and you see comment numbers of

    1
    6
    7
    23
    7
    45
    9
    34
    21
    12

    and you know that threads 2, 5 and 7 have updated and those are the only ones you need to check for new comments.

    #WINNING

    1
  9. wr says:

    Well, I’ve been thinking it’s about time for DOBD to change his handle again, anyway. I’d vote for Detective Sergeant Arthur Dietrich, but I’d also be happy with Elliot Carlin or Gordy Howard.

    No, wait. The Little Reverend Jimmy Joe Jeeter. Can’t be beat…

    2
  10. MarkedMan says:

    I’m waiting for the grammar purists to start hating this site because we disrespect apostrophes, our most under sung punctuation

    1
  11. Mister Bluster says:

    @MarkedMan:..under sung punctuation
    who sings about periods?

  12. de stijl says:

    @MarkedMan:

    Barbintheboonies sure likes to fly her freak flag when it comes to apostrophes.

    I can`t even tell you how much it bugs me out.

  13. wr says:

    @Mister Bluster: “who sings about periods?”

    PJ Harvey.

    Oh, wait, you’re still talking about punctuation…

    1
  14. André Kenji says:

    test

  15. Mister Bluster says:

    Favorite Angel

    No it’s not about punctuation or menstruation.
    It’s a cover of an Alice Cooper song about men beating up women.

  16. de stijl says:

    @wr:

    Pollie Jean!!! Represent.

    PJ Harvey is my gal forever and ever.

  17. de stijl says:

    I wanna see a Haim / PJ Harvey supergroup. That would be a slinky, nasty, cold aF thing.

    It’d be like Toto x ~3.9 – 4.1 billion.

    Add Sia. But only if she brings her dancer avatar with her because that girl kicks ass.