<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

      <title>Comments on: Wordpress spam comments don't disappear from Recent Comments</title>
      <link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments/</link>
      <description>Comments on Ask MetaFilter post Wordpress spam comments don't disappear from Recent Comments</description>
	  	  <pubDate>Sat, 28 Jan 2006 17:51:29 -0800</pubDate>
      <lastBuildDate>Sat, 28 Jan 2006 17:51:29 -0800</lastBuildDate>
      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>

<item>
  	<title>Question: Wordpress spam comments don&apos;t disappear from Recent Comments</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments</link>	
  	<description>I have a WordPress blog (linked on my profile page if that&apos;s helpful). It is set up to notify me when there are comments on postings. I&apos;ve been getting spam comments and deleting them. They disappear from the post where they appeared. However, they DON&apos;T disappear from the &quot;recent comments&quot; module on my homepage. This module contains a link to the spam URLs they are propagating. I know some SQL but almost no PHP. Is this a common problem? Any suggestions?</description>
  	<guid isPermaLink="false">post:ask.metafilter.com,2008:site.31658</guid>
  	<pubDate>Sat, 28 Jan 2006 17:32:06 -0800</pubDate>
  	<dc:creator>scarabic</dc:creator>
	
	<category>wordpress</category>
	
	<category>php</category>
	
	<category>spam</category>
	
</item>
<item>
  	<title>By: Firas</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496205</link>	
  	<description>What plugin or code snippet is generating the recent comments thing? Are you using a staticizing plugin?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496205</guid>
  	<pubDate>Sat, 28 Jan 2006 17:51:29 -0800</pubDate>
  	<dc:creator>Firas</dc:creator>
</item>
<item>
  	<title>By: visual mechanic</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496224</link>	
  	<description>This isn&apos;t really an answer since I don&apos;t use recent comments on my wordpress blog (although I&apos;d love to!), but something I would try. . . have you republished the whole site after you delete the comment?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496224</guid>
  	<pubDate>Sat, 28 Jan 2006 18:22:32 -0800</pubDate>
  	<dc:creator>visual mechanic</dc:creator>
</item>
<item>
  	<title>By: litlnemo</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496247</link>	
  	<description>When I delete spam it does disappear from the recent comments module as well. So I would second Firas&apos; question.&lt;br&gt;
&lt;br&gt;
You shouldn&apos;t have to &amp;quot;republish&amp;quot; anything.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496247</guid>
  	<pubDate>Sat, 28 Jan 2006 19:05:17 -0800</pubDate>
  	<dc:creator>litlnemo</dc:creator>
</item>
<item>
  	<title>By: djgh</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496277</link>	
  	<description>In fact, I can&apos;t think of a Wordpress release that ever had a &amp;quot;republish&amp;quot; option - sounds like a Blogger feature...&lt;br&gt;
&lt;br&gt;
It sounds like the recent comments plugin is caching the comments, so you need to look refreshing the cache. Check out the &amp;quot;Readme&amp;quot; that came with the plugin, or the plugin page. If you tell us which plugin you&apos;re using, it would probably help as well.&lt;br&gt;
&lt;br&gt;
If you&apos;re using &lt;a href=&quot;http://www.semiologic.com/software/recent-comments/&quot;&gt;Fuzzy Recent Comments&lt;/a&gt;, try this:&lt;br&gt;
&lt;br&gt;
http://www.scarabic.net/?action=flush&lt;br&gt;
&lt;br&gt;
&lt;em&gt;Thinking aloud&lt;/em&gt;&lt;br&gt;
Manual way to do this would probably be to open up your MySQL database, and search for the plugin&apos;s table, then manually delete the offending entries (I would imagine they&apos;ve been put into a table - this is all hypothesis).&lt;br&gt;
&lt;br&gt;
Failing all else, the &lt;a href=&quot;http://wordpress.org/support/&quot; title=&quot;Wordpress Support Forums&quot;&gt;Wordpress Support Forums&lt;/a&gt; are always filled with wonderful people who could help.&lt;br&gt;
&lt;br&gt;
(P.S - &lt;a href=&quot;http://akismet.com/&quot;&gt;Akismet&lt;/a&gt; is pretty darn good at stopping spam - all you need is a Wordpress API key to use it on your own install. Think you need WP 2.0 though, so if you&apos;re still running 1.5.2 then you&apos;ll have to look at other options. Check out &lt;a href=&quot;http://www.tamba2.org.uk/wordpress/spam/&quot;&gt;Podz&apos; guide&lt;/a&gt; and the &lt;a href=&quot;http://codex.wordpress.org/Combating_Comment_Spam&quot;&gt;WP Codex Page&lt;/a&gt;)</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496277</guid>
  	<pubDate>Sat, 28 Jan 2006 20:16:14 -0800</pubDate>
  	<dc:creator>djgh</dc:creator>
</item>
<item>
  	<title>By: scarabic</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496295</link>	
  	<description>I dunno what plugin/code manages the &amp;quot;recent comments&amp;quot; thing. I don&apos;t see anything in the plug-ins list which relates to comments, nor do I recall installing WP plugins of any kind. I appear to have a default set of 3 plugins. The front page is a template I got from somewhere long ago (don&apos;t recall where) and which I can only barely manage to tweak (no PHP skillz).</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496295</guid>
  	<pubDate>Sat, 28 Jan 2006 21:00:50 -0800</pubDate>
  	<dc:creator>scarabic</dc:creator>
</item>
<item>
  	<title>By: Firas</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496299</link>	
  	<description>Which of those 3 plugins are active, and could you post your index.php and sidebar.php at http://pastebin.com/ ?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496299</guid>
  	<pubDate>Sat, 28 Jan 2006 21:08:46 -0800</pubDate>
  	<dc:creator>Firas</dc:creator>
</item>
<item>
  	<title>By: madman</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496315</link>	
  	<description>Scarabic, I&apos;m not a PHP expert, and I haven&apos;t dug into the guts of WordPress, but I looked at your source markup, and it showed me that you&apos;re using the &lt;a href=&quot;http://t37.net/we-fade-to-grey&quot;&gt;Devenir En Gris&lt;/a&gt; theme for your blog. I downloaded the theme and looked in the sidebar.php code for your &amp;quot;recent comments&amp;quot; code. And this is what I got:&lt;br&gt;
&lt;br&gt;
&amp;lt;?php&lt;br&gt;&lt;br&gt;
global $comment;&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
if ( $comments = $wpdb-&amp;gt;get_results(&amp;quot;SELECT comment_author, comment_author_url, comment_ID, comment_post_ID FROM $wpdb-&amp;gt;comments WHERE comment_approved=&apos;1&apos; ORDER BY comment_date_gmt DESC LIMIT 5&amp;quot;) ) :&lt;br&gt;&lt;br&gt;
?&amp;gt;&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&amp;lt;li id=&amp;quot;lastcomments&amp;quot;&amp;gt;&amp;lt;div class=&amp;quot;menutitle&amp;quot;&amp;gt;&amp;lt;?php _e(&apos;Comments&apos;); ?&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;ul&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;?php&lt;br&gt;&lt;br&gt;
foreach ($comments as $comment) {&lt;br&gt;&lt;br&gt;
  echo &apos;&amp;lt;li&amp;gt;&apos; . sprintf(&apos;%s &amp;lt;span style=&amp;quot;text-transform: lowercase;&amp;quot;&amp;gt;on&amp;lt;/span&amp;gt;&amp;lt;br /&amp;gt;%s&apos;, get_comment_author_link(), &apos;&amp;lt;a href=&amp;quot;&apos;. get_permalink($comment-&amp;gt;comment_post_ID) . &apos;#comment-&apos; . $comment-&amp;gt;comment_ID . &apos;&amp;quot;&amp;gt;&apos; . get_the_title($comment-&amp;gt;comment_post_ID) . &apos;&amp;lt;/a&amp;gt;&apos;);&lt;br&gt;&lt;br&gt;
  echo &apos;&amp;lt;/li&amp;gt;&apos;;&lt;br&gt;&lt;br&gt;
}&lt;br&gt;&lt;br&gt;
?&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;/ul&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;/li&amp;gt;&lt;br&gt;&lt;br&gt;
&amp;lt;?php endif; ?&amp;gt;&lt;/p&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
If any of the other WordPress or PHP gurus can take a look at that and see what&apos;s screwing up, you might have your answer. At casual glance, it seems to be selecting only those comments where the &lt;strong&gt;comment_approved&lt;/strong&gt; flag is set to &amp;quot;1&amp;quot; (true/yes) which &lt;em&gt;should&lt;/em&gt; work.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496315</guid>
  	<pubDate>Sat, 28 Jan 2006 21:40:47 -0800</pubDate>
  	<dc:creator>madman</dc:creator>
</item>
<item>
  	<title>By: djgh</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496320</link>	
  	<description>Would I be correct in assuming you are using the &lt;a href=&quot;http://t37.net/we-fade-to-grey&quot;&gt;Devenir en Gris/Fade to grey&lt;/a&gt; template? If so, that includes the recent comments code as default, so it isn&apos;t a plugin.&lt;br&gt;
&lt;br&gt;
If it is that theme, then it would appear (and people with greater PHP and WP skills than mine can confirm or deny) that it&apos;s calling the comments from the default Wordpress table for comments - in other words, they&apos;re still in your database.&lt;br&gt;
&lt;br&gt;
(On preview - gah, beaten to the punch. And it would appear it took me ten minutes to make this comment.)</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496320</guid>
  	<pubDate>Sat, 28 Jan 2006 21:53:28 -0800</pubDate>
  	<dc:creator>djgh</dc:creator>
</item>
<item>
  	<title>By: djgh</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496326</link>	
  	<description>Perhaps compare your sidebar.php section dealing with recent comments with the default?</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496326</guid>
  	<pubDate>Sat, 28 Jan 2006 22:18:00 -0800</pubDate>
  	<dc:creator>djgh</dc:creator>
</item>
<item>
  	<title>By: scarabic</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496353</link>	
  	<description>&lt;em&gt;Devenir en Gris&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
Yes, that sounds right. I think the next step is to check if the comments exist in the db or not. I&apos;ll have to start poking around there.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496353</guid>
  	<pubDate>Sun, 29 Jan 2006 00:43:07 -0800</pubDate>
  	<dc:creator>scarabic</dc:creator>
</item>
<item>
  	<title>By: scarabic</title>
  	<link>http://ask.metafilter.com/31658/Wordpress-spam-comments-dont-disappear-from-Recent-Comments#496575</link>	
  	<description>The comments were still in the DB so I just deleted them.&lt;br&gt;
&lt;br&gt;
&lt;em&gt;it seems to be selecting only those comments where the comment_approved flag is set to &amp;quot;1&amp;quot; (true/yes) which should work.&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
They had the flag comment_approved set to &amp;quot;spam&amp;quot; so I don&apos;t know how they continued showing up. I think I will moderate a little differently from now on - just delete stuff instead of marking it as spam. &lt;br&gt;
&lt;br&gt;
Thanks all! And thanks to the geniuses who created PHPMyAdmin.</description>
  	<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.31658-496575</guid>
  	<pubDate>Sun, 29 Jan 2006 12:10:19 -0800</pubDate>
  	<dc:creator>scarabic</dc:creator>
</item>

    </channel>
</rss>
