WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#8468 closed defect (bug) (invalid)

Publishing/Saving new post after 2.6 to 2.6.5 produces incorrect SQL syntax errors

Reported by: dolemite Owned by:
Milestone: Priority: normal
Severity: major Version: 2.6
Component: Administration Keywords: reporter-feedback
Focuses: Cc:

Description (last modified by westi)

I just updated my wordpress blog (http://www.azvibe.com) from 2.6 to 2.6.5 (no intermediate upgrades and the upgrade seemed to go fine. However, when I went to write and then publish a new post, received the errors noted in Exhibit A at the bottom of the ticket.

I then took one of the sql commands from the error and then plugged it into phpMyAdmin SQL query analyzer:

SELECT ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title' FROM wp_posts WHERE post_date > '2008-12-01 00:00:00' AND post_date < '2009-01-01 00:00:00' AND post_status = 'publish' AND post_type = 'post' ORDER BY

...and it came back with this error:

SQL query:

SELECT ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title'
FROM wp_posts
WHERE post_date > '2008-12-01 00:00:00'
AND post_date < '2009-01-01 00:00:00'
AND post_status = 'publish'
AND post_type = 'post'
ORDER BY
LIMIT 0 , 30

MySQL said:
#1064 - 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 'LIMIT 0, 30' at line 2

Here's the original unanswered support ticket with some more information:

http://wordpress.org/support/topic/221833?replies=5#post-913826

I'm attaching a copy of post.php for you to look over. If any other files are needed please let me know

Exhibit A:

post.php after attempting to save and/or publish the page came up with the following errors:

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 at line 1]
SELECT ID AS 'ID', post_date AS 'post_date', post_title AS 'post_title' FROM wp_posts WHERE post_date > '2008-12-01 00:00:00' AND post_date < '2009-01-01 00:00:00' AND post_status = 'publish' AND post_type = 'post' ORDER BY

Warning: Cannot modify header information - headers already sent by (output started at <absolute path on server>/wp-includes/wp-db.php:517) in <absolute path on server>/wp-includes/pluggable.php on line 770

Attachments (1)

post.php (99.0 KB) - added by dolemite 5 years ago.

Download all attachments as: .zip

Change History (7)

dolemite5 years ago

comment:1 in reply to: ↑ description dolemite5 years ago

I should note that I am dead in the water and unable to do any work as a result of this bug/error.

Thanks in advance!

comment:2 DD325 years ago

  • Keywords reporter-feedback added

Disable your plugins, see if that helps, if not, switch to the default theme, see if that fixes it.

The Query looks like its a plugin query, I dont think WordPress makes any queries which look like that.

comment:3 dolemite5 years ago

I'll give that a try and see what happens.

comment:4 westi5 years ago

  • Description modified (diff)
  • Version set to 2.6

Tidies up description.

comment:5 ulfben5 years ago

  • Resolution set to invalid
  • Status changed from new to closed

This is not an issue with WordPress, but with a plugin. Please keep further discussion on this topic, in this thread.

Closing.

comment:6 jacobsantos5 years ago

  • Milestone 2.8 deleted
Note: See TracTickets for help on using tickets.