Support » Fixing WordPress » Editing comments in the admin station

  • presto


    When I edit a comment in the administrator station. I get an error that involved single quotations. For some reason the edit-comments.php file does not like single quotes and gives me an
    Database error: [You have an error in your SQL syntax near ‘t you agree that we should go directly to the individual first to discuss this? ‘ at line 3]
    If I remove the single quotes, then the comment can be edited from the administrator station. Where do I put in the code that will allow the single quotes?
    Thanks in advance for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • blogjam


    This seems to have been around for a while – it was mentioned in May and was apparently fixed in CVS in June, although in my install of Mingus (just a few days old) it’s still a problem.
    I’d love a fix if someone has one.

    I was getting this error as well and to fix it I just added the following line:
    $content = $wpdb->escape($content);
    below the command on line 694:
    $content = format_to_post($content);
    Here’s the diff if I haven’t explained it well enough.
    — post.php 2004-10-05 15:40:24.000000000 -0600
    +++ newpost.php 2004-10-05 15:40:20.000000000 -0600
    @@ -692,6 +692,7 @@
    $content = balanceTags($content);
    $content = format_to_post($content);
    + $content = $wpdb->escape($content);
    $result = $wpdb->query(“
    UPDATE $tablecomments SET

    I’m not able to find anything in 1.2.1, in post.php, that closely matches the above diff, so I’m hesitant to try this fix. I’m using 1.2.1 and am having this problem. I also posted to which also deals with this problem, but no fix is suggested there as of now.

    I had the very same problem when editing comments.
    The fix suggested by jaden solved it.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Editing comments in the admin station’ is closed to new replies.