WordPress.org

Ready to get started?Download WordPress

Forums

Error posting (14 posts)

  1. amacgenius
    Member
    Posted 8 years ago #

    Ever since the 2.0.1 upgrade everytime I post a new post or edit a post and submit the post/edit - it works but the page spits this back at me:

    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 'ON (wp_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 7 ' at line 4]
    SELECT tag_id FROM wp_posts INNER JOIN wp_post2cat ON (wp_posts.ID = wp_post2cat.post_id) INNER JOIN ON (wp_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 7 AND ID = 264 ORDER By post_date DESC

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

    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 'AND category_id <> 7' at line 4]
    SELECT post_id FROM wp_post2cat WHERE category_id = AND category_id <> 7

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

    Now I'm only good at design, so I haven't the slightest clue what this means, if somebody could help me that'd be great...

  2. amacgenius
    Member
    Posted 8 years ago #

    Nobody?

  3. amacgenius
    Member
    Posted 8 years ago #

    This is a really annoying error I'd like to fix...anybody help?

  4. amacgenius
    Member
    Posted 8 years ago #

    ANYBODY, this is seriously annoying!

  5. asanocki
    Member
    Posted 8 years ago #

    I'm with you -- I get the same thing. I've tested some save and edits and all I can tell is that it only seems to do it when I add an image to the post, Thumbnail only, that is linked to another page (as opposed to linked to the image or to nothing).

    Thoughts?

  6. lassmann
    Member
    Posted 8 years ago #

    I've got the same problem here (although i only get one of them.)..
    help us please!

  7. caparks
    Member
    Posted 8 years ago #

    Hey gang!

    I had the exact same problem and posted it here: http://wordpress.org/support/topic/63370?replies=3

    I stopped getting errors after I disabled a couple of my plug-ins (Jeromes Keywords and a WP DB mgmt plug-in] After I turned those off, I no longer had the error.

    Anyway - give it a try and I hope that it helps.

    - caparks

  8. jesterz
    Member
    Posted 8 years ago #

    I posted this in another thread, but the problem looks to me like it's in the missing database name here...

    SELECT tag_id FROM werdprezz_posts INNER JOIN werdprezz_post2cat ON (werdprezz_posts.ID = werdprezz_post2cat.post_id) INNER JOIN ON (werdprezz_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 11 AND ID = 227 ORDER By post_date DESC

    It could also be the double "INNER JOIN ON" blocks...

    SELECT tag_id FROM werdprezz_posts INNER JOIN werdprezz_post2cat ON (werdprezz_posts.ID = werdprezz_post2cat.post_id) INNER JOIN ON (werdprezz_posts.ID = .post_id) WHERE post_date > 0 AND category_id <> 11 AND ID = 227 ORDER By post_date DESC

    I don't know MySQL/SQL syntax, but I'm betting it has something to do with those blocks.

    Just my $0.02. Hope that helps (I'm working on trying to find how/why that text is generated).

  9. jesterz
    Member
    Posted 8 years ago #

    Follow-up: I'm using the Extended Live Archives plug-in. For some reason, this plug-in assumes I'm using some plug-in called Ultimate Tag Warrior (UTW). Well, I'm not, but the plug-in was detecting UTW and entering the following code block in af-extended-archive-include.php:

    // For UTW
    if($utw_is_present) {
    $query = "SELECT tag_id
    FROM $wpdb->posts
    INNER JOIN $wpdb->post2cat ON ($wpdb->posts.ID = $wpdb->post2cat.post_id)
    INNER JOIN $tablepost2tag ON ($wpdb->posts.ID = $tablepost2tag.post_id)
    WHERE post_date > 0
    $exclusions $dojustid
    ORDER By post_date DESC";
    logthis("SQL Query :".$query, __FUNCTION__, __LINE__);
    $results = $wpdb->get_results($query);
    if ($results) {
    foreach($results as $result) {
    $this->postToGenerate['tag_id'][] = $result->tag_id;
    }
    }
    }
    // End of stuff for UTW

    To fix/patch this, all I did was change the second line to:

    if(0 && $utw_is_present) {

    The "0 &&" short-circuits the conditional and the block gets skipped. Now my post-edits work without a problem!

    Hope that helps!

  10. lassmann
    Member
    Posted 8 years ago #

    sorry folks - none of them works for me.. turned off all my plugins - to no avail..

  11. williambrandes
    Member
    Posted 8 years ago #

    Seems to be 2 weeks after the last post. I just installed the latest (first time) and get the errors when editing a PAGE although the page is properly posted. Damn irritating though, especially folks that I'm trying to interest in the tool.

    Same question here. Is anybody home? Should I migrate to an older version? William

  12. komakino
    Member
    Posted 8 years ago #

    Did run with the same problem on a wordpress 2.0.2 installation and solve it by desactivating the Google Sitemaps 3.0b1 plug-in. Maybe this will help.

  13. bitworker
    Member
    Posted 8 years ago #

    I had the same problem with the photopress plugin for wordpress.
    I have solved the problem by replacing the 'JOIN' to 'LEFT JOIN' in the php files.

  14. lassmann
    Member
    Posted 8 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic