Mark on WordPress

WordPress 2.0.3 Bug: “Are you sure?” dialog when editing comments

Posted in wordpress by Mark Jaquith on June 1st, 2006

Crap! WordPress 2.0.3 shipped with a rather annoying pair triplet of bugs:

  • Editing a comment will generate an “Are you sure?” dialog
  • A bug in the “Are you sure?” dialog adds slashes in front of all of your quote characters
  • After editing comments, you are not forwarded to the correct location

So, when you edit comments, it’ll needlessly take you to the “Are you sure?” dialog (intended for people with blank HTTP_REFERER values) and then it’ll mess up the comment by changing something like:

I'm sleepy

to this:

I\'m sleepy

Enough foreplay… time to fix the stupid thing:

The fix

Forget those steps below… just use this plugin I wrote!

  1. Open up /wp-admin/post.php in a plaintext editor
  2. Line 325 is the bad line: check_admin_referer('update-comment');
  3. Change this line to: check_admin_referer('update-comment' . $_POST['comment_ID']);

I’ll post another entry when I get the “Are you sure?” slashing bug figured out… but note that fixing this bug will avoid that bug, by skipping the “Are you sure?” dialog for comment editing.

31 Responses to 'WordPress 2.0.3 Bug: “Are you sure?” dialog when editing comments'

Subscribe to comments with RSS or TrackBack to 'WordPress 2.0.3 Bug: “Are you sure?” dialog when editing comments'.

  1. [...] Make sure you check out this fix for 2.0.3’s rather annoying “Are you sure?” dialog popping up when you edit comments and adding slashes to the comment you’re editing. [...]

  2. [...] You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your ownsite. [...]

  3. ceejayoz.com · WordPress 2.0.3 Bug said, on June 1st, 2006 at 8:31 pm

    [...] Those of you who’ve upgraded to WordPress 2.0.3 will want to apply this quick fix to get editing comments working correctly again. [...]

  4. Computer Guru said, on June 2nd, 2006 at 1:22 am

    Hey Mark…
    Is there a reason this isn’t fixed in the SVN?

    Also, in 3835, changes have been made to edit-form-comment.php…. I presume these fix the slashing bug?

    Thanks,
    CG

  5. [...] I’ve written a plugin that will fix the following annoying bugs that were introduced by the recent WordPress 2.0.3 release: [...]

  6. Mark Jaquith said, on June 2nd, 2006 at 2:07 am

    CG,
    It is fixed in SVN. /branches/2.0/ and /trunk/ should be kosher now.

    The slashing bug fix was in /wp-includes/pluggable-functions.php. The edit-form-comment.php fix was to change the nonce key on the receiving end.

    But if you don’t want to run SVN code, I just now released a plugin that fixes the three major issues (”are you sure?” on comments, slashes bug, comment edit redirection bug) without modifying any core code.

  7. weblars.de / blog » Wordpress-Update said, on June 2nd, 2006 at 5:56 am

    [...] Nachtrag (02.06.2006): Zu früh gefreut. Leider wurde Version 2.0.3 vor der Freigabe offenbar nicht ausreichend getestet. Bei den Änderungen (näheres zu den Gründen für das neue Release hier) haben sich kleinere Fehler eingeschlichen. Einen Lösungsvorschlag gibt es hier. 1 Tag(e) alt | General, WordPress | Werbung [...]

  8. Jim said, on June 2nd, 2006 at 7:47 am

    Nice fix. I ended up just going ahead and fixing the code itself, though, since it’s not really any more trouble to do that than it is to download, unzip, upload, and activate the plugin itself.

  9. [...] Fortunately, Mark has a handy plugin which removes the hassle of comment edit confirmation boxes. Footing the bill [...]

  10. Computer Guru said, on June 2nd, 2006 at 12:15 pm

    Thanks Mark, you’re the man!
    It *does* work now great.
    Maybe a 2.0.3.1 release? This is quite annoying, and not everyone knows enough to visit the “hacker blogs..”

  11. Mark Jaquith said, on June 2nd, 2006 at 12:41 pm

    Don’t know about 2.0.3.1 (ugh, I hate the 4-digit releases!) If it were up to me, I’d wait about 3 weeks, fix as many more bugs as I could, and then release 2.0.4

    We’ll see. Until then, spread the word about the plugin!

  12. at Valontuoja said, on June 2nd, 2006 at 3:55 pm

    [...] Internet kertoi minulle tuosta WordPress 2.0.3 päivityksestä, että kyseisessä versiossa on ötököiden poistamisen sijasta onnistettu luomaan niitä. Lue lisää… [...]

  13. Squashed bug at Decidedly Bored said, on June 2nd, 2006 at 8:13 pm

    [...] When editing comments in the latest release of WordPress, there’s an irritating bug that generates a “Are you sure?” prompt and then adds backslashes in front of all quote characters. Thankfully before tearing my hair out, I found Mark Jaquith’s bug fix. You can edit the code in post.php or install his handy plugin. Posted in Asides and Blogging Tags: blogging, bug, comments, fix, solution, wordpress. [...]

  14. Nina said, on June 3rd, 2006 at 3:35 pm

    The plugin works great!

    I’m getting another bug with the new upgrade in that I can’t load functions.php. Using the Kubrick default theme (or K2, or any that require that file), clicking on the “Current Theme Options” sub-tab gives me a “Cannot load functions.php” error.

    Or is this just me?

  15. rxbbx said, on June 4th, 2006 at 12:49 am

    I also have some strange problems when editing a link in the admin backend from the Blogroll. It redirects not correctly. It’s in the linkmanager.php file.

  16. [...] There were also some problems with this new version: http://markjaquith.wordpress.com/2006/06/01/wordpress-203-bug-are-you-sure-dialog-when-editing-comments/ [...]

  17. Mark Jaquith said, on June 4th, 2006 at 2:15 am

    rxbbx,
    Fixed that bug in version 0.3 of the WordPress 2.0.3 Tuneup plugin.

  18. rxbbx said, on June 4th, 2006 at 7:48 am

    Thnx for your work.. It works like a charm.

  19. [...] The bug, according to Mark Jaquith, appears when you are editing comments in the WordPress Administration Panels. When you are finished editing comments, it asks you “Are you sure?” and when you click OKAY, it takes you to the wrong page and screws up your comments by inserting a slash before every quote mark. [...]

  20. [...] That’s right as the title said it, for a while now, I’ve recieved a standing warning on WordPress 2.0.3 which has some security fixes but introduces some new annoying bugs particularly the “Are You Sure” bug which fortunately for us has a plugin that fixes it temporarily. [...]

  21. Mitchell said, on July 6th, 2006 at 7:39 pm

    Thanks, Mark. Your plugin kicks butt.

  22. Zfen said, on July 23rd, 2006 at 6:09 am

    A big HOORAY to Mark.

  23. DxBlog said, on July 24th, 2006 at 4:00 pm

    El (los) bug(s) no reparado(s)…

    Con el update de wordpress 2.0.3, vinieron unos dos o tres bugs…
    Acá les condenso la idea: Al editar un comentario va a aparecer un diálogo molesto de “Are you sure?”. Un bug en esto agrega barras invertidas en todas las comillas. Y…

  24. greg said, on February 14th, 2007 at 9:35 am

    Arteriosclerosis (hardening of the arteries), heart disease or stroke, hypertension (high blood pressure) and high cholesterol. man tabs

  25. Pics said, on December 2nd, 2007 at 10:20 pm

    Welcome to my site - Myusenet-pics

  26. Dion said, on January 8th, 2008 at 2:51 am

    Nice!

  27. rikoman said, on April 9th, 2008 at 7:51 am

    very gooddd. In my blog are problem whit comments T.T http://www.revphp.es

    helpmeee

  28. oibsQ said, on May 4th, 2008 at 5:01 am

    Please Review This Site, You’ll Like It
    [LINK= http://freeaza.110mb.com/ ]lorazepam wikipedia the free encyclopedia[/LINK] lorazepam wikipedia the free encyclopedia

  29. jwmhb said, on May 4th, 2008 at 11:53 am

    Just Stopped by to say hi, Thanks
    [LINK= http://freeazx.110mb.com/ ]free wav to mp3 converter[/LINK] free wav to mp3 converter

  30. LxRuz said, on May 8th, 2008 at 11:14 am

    Dont Stop Showing The World What Youve GotYou Can be very helpfull and see here [LINK=http://fefefreehadaw.110mb.com/]2004 free tax return filing[/LINK] 2004 free tax return filing

  31. MQgcB said, on May 11th, 2008 at 8:35 pm

    Great Persona On the WebsiteGreat Work ,Im Impressed From The Site
    Hillary duff photo gallery

Leave a Reply