#4525 closed defect (bug) (invalid)
atom comment feed has sql error in title
Reported by: | trombonekenny | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.2.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
When building the atom comment feed with 2.2.1 I get the following error when it tries to get the title:
<p class='wpdberror'><strong>WordPress database error:</strong> [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
comment_approved = '1'' at line 2]<br />
<code>SELECT
COUNT(*) FROM wp_comments WHERE comment_post_ID = AND
comment_approved = '1'</code></p>
My MySQL is an older 4.0 build, but it looks like a variable isn't getting evaluated where it should be. Here's a larger section of the output:
<?xml version="1.0" encoding="utf-8" ?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en" > <title type="text">Comments for Recently, it's been like this...</title> <subtitle type="text">A blog. You know, a weblog. </subtitle> <updated>2007-06-24T17:58:50Z</updated> <generator uri="http://wordpress.org/" version="2.2.1">WordPress</generator> <link rel="alternate" type="text/html" href="http://www-dave.cs.uiuc.edu/wordpress" /> <link rel="self" type="application/atom+xml" href="http://www-dave.cs.uiuc.edu/wordpress/comments/feed/atom/" /> <id>http://www-dave.cs.uiuc.edu/wordpress/comments/feed/atom/</id> <entry> <title><div id='error'> <p class='wpdberror'><strong>WordPress database error:</strong> [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 comment_approved = '1'' at line 2]<br /> <code>SELECT COUNT(*) FROM wp_comments WHERE comment_post_ID = AND comment_approved = '1'</code></p> </div>Comment on “Farnum, Christ knows he’s earned it” by Tony</title> <link rel="alternate" href="http://www-dave.cs.uiuc.edu/wordpress/2007/06/22/farnum-christ-knows-hes-earned-it/#comment-43975" type="text/html" /> <author> <name>Tony</name> <uri>http://protected.com</uri> </author> <id>http://www-dave.cs.uiuc.edu/wordpress/2007/06/22/farnum-christ-knows-hes-earned-it/#comment-43975</id> <updated>2007-06-23T14:40:32Z</updated> <published>2007-06-23T14:40:32Z</published>
Change History (4)
Note: See
TracTickets for help on using
tickets.
The RSS 2.0 feed has this same error.