WordPress.org

Ready to get started?Download WordPress

Forums

Error when editing old posts after updating to 2.0.1 (18 posts)

  1. coxgrl1980
    Member
    Posted 8 years ago #

    I just upgraded from WP 2.0 to 2.0.1. When I tried to go back to older posts and edit them, I would get the following error after hitting "Save" or "Save and continue editing"

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '....]

    I figured out the problem occurs only with older posts and happens whenever there is an apostrophe (') in the text of the post. Any idea how to fix this or what it could be?

    My second problem is that at the bottom of the page it says:

    Warning: Cannot modify header information - headers already sent by (output started at /home/beautyst/public_html/wp-includes/wp-db.php:102) in /home/beautyst/public_html/wp-admin/post.php on line 122

    Any thoughts?

  2. coxgrl1980
    Member
    Posted 8 years ago #

    Update: I figured out that this only happens when I link an image in a post to that image on a page, but not when I link the image in the post to the image itslef. I'm confused and would appreciate any input as I do not understand MySQL's and servers and manuals and whatnot...

  3. scribeokc
    Member
    Posted 8 years ago #

    I'm having the same issue as coxgrl1980 in the original post. The second post doesn't seem to be the issue because it affects posts with images as well. I'm going to switch back to 2.0 until some of these bugs are worked out.

  4. phoenix35
    Member
    Posted 8 years ago #

    I have the same problem with 2.0.1
    It seems that versions bring them a lot of bugs because the error is the same when i create a new post !!!!!

  5. Palindrome
    Member
    Posted 8 years ago #

    I have this problem every time I post a NEW post, but the post is still loaded, and it only occurs during initial posting not during subsequent edits.

  6. red-star
    Member
    Posted 8 years ago #

    When i try to edit the editor page jumps top my blog

  7. bagger
    Member
    Posted 8 years ago #

    I have had the same problem as red-star, but with both 2.0 and 2.0.1. WTF?

  8. hurt
    Member
    Posted 8 years ago #

    I'm getting the same exact error with the 2.0.1 update as coxgrl1980. This error is making it hard to edit previous posts...

  9. red-star
    Member
    Posted 8 years ago #

    The solution is to take a look in youre plugin list and see if you have javawp enable. If yes, then disable this plugin!(i got this tip myself)

    If you dont have this plugin, try to disable youre plugins one at a time to find the ugly one.

  10. RavanH
    Member
    Posted 8 years ago #

    I have the same problem but the error message is displayed in the browser address bar (ulr-encoded) and a blog-error page is shown (because I use slug-permalinks): http://www.bethhamidrash.org/wp-admin/%3Cdiv%20id=%5C'error%5C'%3E%09%09%09%3Cp%20class=%5C'wpdberror%5C'%3E%3Cstrong%3EWordPress%20database%20error:%3C/strong%3E%20%5BYou%20have%20an%20error%20in%20your%20SQL%20syntax;%20check%20the%20manual%20that%20corresponds%20to%20your%20MySQL%20server%20version%20for%20the%20right%20syntax%20to%20use%20near%20%5C')%20ORDER%20BY%20post_id,%20meta_key%5C'%20at%20line%201%5D%3Cbr%20/%3E%09%09%09%3Ccode%3ESELECT%20post_id,%20meta_key,%20meta_value%20FROM%20wp_postmeta%20WHERE%20post_id%20IN()%20ORDER%20BY%20post_id,%20meta_key%3C/code%3E%3C/p%3E%09%09%09%3C/div%3Ehttp://www.bethhamidrash.org/wp-admin/post.php

    But after decifering, it turns out to be the same error as coxgrl1980 is talking about (post 1).

    I use WP201 and found this issue only to occur after I have first made a post and hit 'Save' so it has Post Status: Draft or Private. It doen't matter if the post is empty or holds special characters or images; re-opening it and hitting either 'Save' or 'Post' will result in the error... Changes are processed though.

    When the post is finally published, the error will not occur again unless the post is set back to draft or private.

    This occurs on a clean WP201 install with NO extra plugins installed and all standard ones are turned off. Only the database is imported from a backup. That backup has a lot of tables from previously installed and deleted plugins (but never javawp)...

    When I use a clean database and start from scratch, the error has NOT occured while doing the same tests.

    Looks like the problem lies within the database doesn't it?

  11. RavanH
    Member
    Posted 8 years ago #

    HANG ON: I found it! Even on the clean install with clean database the problem is there...

    What i posted above is ONLY true when Permalinks is set to 'Custom' like in my case /%category%/%postname%/ but also /%postname%/ has the same effect. But something like /archive/%postname%/ seems to work fine!?!

    Would this be a BUG?

  12. Palindrome
    Member
    Posted 8 years ago #

    I think it is a bug. I've tried rebuilding my permalinks to no avail. I also have custom permalinks set...hopefully this can be looked at before the next release.

  13. soyola
    Member
    Posted 8 years ago #

    So did we find any solution to this promlem yet because I am constantly getting this kind of error messages

    WordPress database error: [Lost connection to MySQL server during query]
    SELECT comment_post_ID as post_id, COUNT(comment_ID) as comment_count, comment_approved FROM wp_comments GROUP BY comment_post_ID

    Warning: Cannot modify header information - headers already sent by (output started at /home/content/s/o/y/soyola/html/wp-includes/wp-db.php:102) in /home/content/s/o/y/soyola/html/wp-admin/post.php on line 122

  14. Palindrome
    Member
    Posted 8 years ago #

    I am unware of a solution to this problem and I'm rather surprised by that. The gurus here are usually pretty on the ball.

    I'm not sure your problem is related to mine though, soyola

  15. Logickal
    Member
    Posted 8 years ago #

    I've been having errors with posting (and editing posts) that sound most like yours, Palindrome. Started after the 2.0.1 upgrade. Have mostly been living with it, since the posts are saved properly.

    However, I just found out a week or so ago that WP hasn't been properly generating enclosures for my podcast like it used to... don't know if this is related or not.

  16. hovercrafter
    Member
    Posted 8 years ago #

    I have been receiving the same errors. Sometimes it actually results in a double post. I thought at first it was related to some of my plugins so I deactivated all of them and did a couple more posts. Still had the same problems.

    I am starting to wonder if this is something in the WPDB class or in the post class that is causing extra long loops to be performed?

  17. rdsmes
    Member
    Posted 8 years ago #

    RavanH and others -

    If you're seeing the 404 problem after you have used the save-and-continue feature (with the long mySQL error string at the end of the URL), there has already been considerable discussion on this matter, and a fix has been entered for testing.

    Check this post from Ryan in the other thread for the developers' proposed change to correct the problem.

  18. Dickie
    Member
    Posted 8 years ago #

    Same here too... Mine happens when editing a particular page (not post), plus I also have permalinks set to "date and name based"

    Dickie

Topic Closed

This topic has been closed to new replies.

About this Topic