<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments on: Can&#8217;t delete Akismet spam comments in latest Wordpress</title>
	<atom:link href="http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/</link>
	<description></description>
	<pubDate>Fri, 09 Jan 2009 03:42:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Akismet spam delete all problem fixed &#187; Moving at the Speed of Creativity</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58498</link>
		<dc:creator>Akismet spam delete all problem fixed &#187; Moving at the Speed of Creativity</dc:creator>
		<pubDate>Sat, 30 Aug 2008 01:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58498</guid>
		<description>[...] Ryan! The Wordpress Akismet problem I blogged about on August 25th has been [...]</description>
		<content:encoded><![CDATA[<p>[...] Ryan! The Wordpress Akismet problem I blogged about on August 25th has been [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wesley Fryer</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58426</link>
		<dc:creator>Wesley Fryer</dc:creator>
		<pubDate>Tue, 26 Aug 2008 17:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58426</guid>
		<description>OK-- thanks for the clarification... You are right, I was talking about being on the Akismet Spam page and trying to delete comments there... I do appreciate the offer to help tho. I may try to reinstall on a clean version of WP. I'm also going to reach out to James Farmer of EduBlogs who hosts the k12onlineconference site for us and see if he has ideas.</description>
		<content:encoded><![CDATA[<p>OK&#8211; thanks for the clarification&#8230; You are right, I was talking about being on the Akismet Spam page and trying to delete comments there&#8230; I do appreciate the offer to help tho. I may try to reinstall on a clean version of WP. I&#8217;m also going to reach out to James Farmer of EduBlogs who hosts the k12onlineconference site for us and see if he has ideas.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58424</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 26 Aug 2008 14:57:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58424</guid>
		<description>It's not that I think it will work only if there's no spam, it's that I thought that's where the bug was. However, if you have a lot of spam in the queue then what I told you to do won't fix anything, it will only seem that way... The implication is that the bug is somewhere else.

I thought you might have had no spam, in which case you trip a bug where a database query returns false instead of an array of data. The changes I suggested above address that false return as if the query returned no results. You are implying that the lack of results is not because there is no spam, but because the query is wrong: there is spam, however you can't select it by querying the database for all comments that have comment_approved set to zero.

The more I think about this, the more I think we're experiencing two different issues. I'm clicking the 'Check For Spam' link on the Comments page, but you're trying to delete spam, maybe from the Akismet Spam(N) link? My wordpress install is on an intranet and I don't get any spam there, so I don't have any comments in the queue to test.

I thought I could help you with a quick fix, but it seems that's not the case. I'd not make the changes I suggested in my previous comment since it appears that hides the problem without fixing it. Sorry I couldn't be of more help here.</description>
		<content:encoded><![CDATA[<p>It&#8217;s not that I think it will work only if there&#8217;s no spam, it&#8217;s that I thought that&#8217;s where the bug was. However, if you have a lot of spam in the queue then what I told you to do won&#8217;t fix anything, it will only seem that way&#8230; The implication is that the bug is somewhere else.</p>
<p>I thought you might have had no spam, in which case you trip a bug where a database query returns false instead of an array of data. The changes I suggested above address that false return as if the query returned no results. You are implying that the lack of results is not because there is no spam, but because the query is wrong: there is spam, however you can&#8217;t select it by querying the database for all comments that have comment_approved set to zero.</p>
<p>The more I think about this, the more I think we&#8217;re experiencing two different issues. I&#8217;m clicking the &#8216;Check For Spam&#8217; link on the Comments page, but you&#8217;re trying to delete spam, maybe from the Akismet Spam(N) link? My wordpress install is on an intranet and I don&#8217;t get any spam there, so I don&#8217;t have any comments in the queue to test.</p>
<p>I thought I could help you with a quick fix, but it seems that&#8217;s not the case. I&#8217;d not make the changes I suggested in my previous comment since it appears that hides the problem without fixing it. Sorry I couldn&#8217;t be of more help here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wesley Fryer</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58423</link>
		<dc:creator>Wesley Fryer</dc:creator>
		<pubDate>Tue, 26 Aug 2008 14:27:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58423</guid>
		<description>Actually I have a lot of spam in the queue. Since I upgraded to WP 2.6.1 on this blog where I'm having this problem, the blog has received LOTS more spam than it was getting running version 2.2, which mystifies me-- I would think the security settings would be better on the new version rather than the old in terms of spam protection. Spammers must be targeting their techniques to the latest version of WP.

I am going to try the solution you suggested later today... But if you're thinking this will just work when there is NOT something in the queue, then I don't think it will work... I may also backup the DB and re-install from scratch on a sandbox server and see if that works...</description>
		<content:encoded><![CDATA[<p>Actually I have a lot of spam in the queue. Since I upgraded to WP 2.6.1 on this blog where I&#8217;m having this problem, the blog has received LOTS more spam than it was getting running version 2.2, which mystifies me&#8211; I would think the security settings would be better on the new version rather than the old in terms of spam protection. Spammers must be targeting their techniques to the latest version of WP.</p>
<p>I am going to try the solution you suggested later today&#8230; But if you&#8217;re thinking this will just work when there is NOT something in the queue, then I don&#8217;t think it will work&#8230; I may also backup the DB and re-install from scratch on a sandbox server and see if that works&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58421</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Tue, 26 Aug 2008 12:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58421</guid>
		<description>Wesley, I know you said you're running the same stuff on some other sites with no problems. Do those sites have anything in their queue? Based on what I saw in the code, I'm sticking with my theory above (same as what you saw in the second post you linked): the bug only appears when there are no items in the queue. As long as there's something in there, you won't see this bug.</description>
		<content:encoded><![CDATA[<p>Wesley, I know you said you&#8217;re running the same stuff on some other sites with no problems. Do those sites have anything in their queue? Based on what I saw in the code, I&#8217;m sticking with my theory above (same as what you saw in the second post you linked): the bug only appears when there are no items in the queue. As long as there&#8217;s something in there, you won&#8217;t see this bug.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sperge</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58418</link>
		<dc:creator>Sperge</dc:creator>
		<pubDate>Tue, 26 Aug 2008 06:41:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58418</guid>
		<description>I get exactly the same error messages with the latest Akismet and WP 2.6.1, so it does look like a bug to me.

When I did the upgrade, I had migrated the website to a new domain at the same time so I thought it may have had something to do with the move. But obviously that isn't the case since you're having the same problem.

I'll try Jason's bug fix when I have a spare moment - but hopefully this is something Akismet will fix shortly anyway.</description>
		<content:encoded><![CDATA[<p>I get exactly the same error messages with the latest Akismet and WP 2.6.1, so it does look like a bug to me.</p>
<p>When I did the upgrade, I had migrated the website to a new domain at the same time so I thought it may have had something to do with the move. But obviously that isn&#8217;t the case since you&#8217;re having the same problem.</p>
<p>I&#8217;ll try Jason&#8217;s bug fix when I have a spare moment - but hopefully this is something Akismet will fix shortly anyway.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58398</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 25 Aug 2008 20:32:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58398</guid>
		<description>I actually do have a Wordpress Installation to check out and I took a look at my copy of Akismet.php. Seems to be pretty close to yours, however I get the error on line 722. I looked into it and confirmed my understanding of what's happening. When you have zero comments to check, the call to wpdb (which is a wrapper for ezSQL) returns false (http://justinvincent.com/docs/ezsql/ez_sql_help.htm in the demo explained section). The code doesn't expect this, and as I said it throws an error because instead of an array of results, it gets false.

I fixed it by using a small check that is documented at that ezSQL page. essentially, change the line before the foreach to this:
if($moderation = $wpdb-&#62;get_results( "SELECT * FROM $wpdb-&#62;comments WHERE comment_approved = '0'", ARRAY_A )){

and then add a } before the wp_direct(... line (which I think is 747 for you). When no comments need to be reviewed, a click on the check for spam button should essentially do nothing (redirect you back to that page with no message; not the best scenario, but better than an error). If there are results, they should get processed.

Hope this helps.</description>
		<content:encoded><![CDATA[<p>I actually do have a Wordpress Installation to check out and I took a look at my copy of Akismet.php. Seems to be pretty close to yours, however I get the error on line 722. I looked into it and confirmed my understanding of what&#8217;s happening. When you have zero comments to check, the call to wpdb (which is a wrapper for ezSQL) returns false (http://justinvincent.com/docs/ezsql/ez_sql_help.htm in the demo explained section). The code doesn&#8217;t expect this, and as I said it throws an error because instead of an array of results, it gets false.</p>
<p>I fixed it by using a small check that is documented at that ezSQL page. essentially, change the line before the foreach to this:<br />
if($moderation = $wpdb-&gt;get_results( &#8220;SELECT * FROM $wpdb-&gt;comments WHERE comment_approved = &#8216;0&#8242;&#8221;, ARRAY_A )){</p>
<p>and then add a } before the wp_direct(&#8230; line (which I think is 747 for you). When no comments need to be reviewed, a click on the check for spam button should essentially do nothing (redirect you back to that page with no message; not the best scenario, but better than an error). If there are results, they should get processed.</p>
<p>Hope this helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.speedofcreativity.org/2008/08/24/cant-delete-akismet-spam-comments-in-latest-wordpress/comment-page-1/#comment-58381</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Mon, 25 Aug 2008 19:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.speedofcreativity.org/?p=3013#comment-58381</guid>
		<description>foreach iterates over an array, and what your error means is that $moderation was not an array. The second error is typically (in my experience) caused by the first. One plugin tried to edit the header (http header that is) data, however it had already been sent because the akismet plugin caused an error and that error was sent to your browser. If you got rid of the first error, the second wouldn't occur.

You could try a couple of things. First would be to go into your plugins folder and backup the akismet plugin and then reinstall it. The second, similar to what is described in that second post you link, would be to hack the code so as to fix the problem described there.

I'm not so familiar with Wordpress that I can hack on this without having the issue myself. Let me know if there are other questions you have, or feel free to zip your akismet.php file and email it to me and I can take a look. Good luck!</description>
		<content:encoded><![CDATA[<p>foreach iterates over an array, and what your error means is that $moderation was not an array. The second error is typically (in my experience) caused by the first. One plugin tried to edit the header (http header that is) data, however it had already been sent because the akismet plugin caused an error and that error was sent to your browser. If you got rid of the first error, the second wouldn&#8217;t occur.</p>
<p>You could try a couple of things. First would be to go into your plugins folder and backup the akismet plugin and then reinstall it. The second, similar to what is described in that second post you link, would be to hack the code so as to fix the problem described there.</p>
<p>I&#8217;m not so familiar with Wordpress that I can hack on this without having the issue myself. Let me know if there are other questions you have, or feel free to zip your akismet.php file and email it to me and I can take a look. Good luck!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.290 seconds -->
