PDA

View Full Version : Annoying Wordpress Quirk



orion_joel
10-08-2008, 09:19 PM
When i first started getting spam comment's on both of my Wordpress blogs i was just clicking the spam option and not thinking really what happened to it. I realized soon after that it marked it as spam did not display it but for some reason still keeps the count in the total comments on the dashboard.

Since i noticed this i generally just hit delete on all the spam comments, however i would like to get rid of the comments i marked as spam so that they are not being included in the count. Can anyone suggest the best way that this may be done?

vangogh
10-08-2008, 09:41 PM
What version of WordPress are you using? I don't see the total comment count in my dashboard. I see a box with recent comments, but nothing with a total count.

orion_joel
10-08-2008, 11:28 PM
Under the right now heading on the Dashboard it has the following have put bold on the part i mean.

You have 34 posts, 1 page, 6 drafts, contained within 10 categories and 0 tags. You have 98 total comments, 4 approved, 94 spam and 0 awaiting moderation.

The version that i am using is 2.6.1 but will be upgrading to 2.6.2 later today, as it has only just come up as an available update on fantastico. Just have to make sure i remember to add in the extra code for analytics, like i forgot to do last time.

vangogh
10-09-2008, 02:17 AM
That explains why I don't see the total comments. My WP is a little older. I decided to wait till 2.7 comes out to upgrade. I've only been upgrading specific files that had security warnings.

I do know the spam comments stay in the database. When I moved from my old site a few months ago I noticed the spam comments were in the exported xml files. I'm not really sure that there's an easy way to remove the comments. You might have to delete them directly in the database. It'll probably be a pain. You might need to keep track of all the comment ids you want to delete and then log into phpMyAdmin and delete them there. That wouldn't be fun.

So you use a spam plugin? I use spam karma 2 and it shows me stats for number of comments flagged as spam and number of approved comments

billbenson
10-09-2008, 02:41 AM
No idea how WP is structured, but I bet you could use phpmyadmin to delete the spam from whatever table they are contained in. There are a number of other ways to deal with this. You could add an additional column to the table that is a spam y, n. I don't like that approach because altering tables makes updates more difficult as you now have a non standarder version.

I would be more inclined to write a table that is structured like id, spam (y,n), and maybe a couple of other things. Mark spam to the new table as you see it or however you detect it. Periodically execute a script that deletes the comments you have noted as spam. Having someone do something like that isn't a lot of programming time.

vangogh
10-09-2008, 02:51 AM
Spam is in a comments table. I forget the exact name, but I'm pretty sure the word comments is in there. It's easy to find. I don't remember if there was a field to identify the comment as spam, but it would make sense that there would be.

I wouldn't recommend altering the the basic table though. It could probably cause issues with future upgrades.

billbenson
10-09-2008, 01:46 PM
Ya, its worth mentioning as I've run into it in oscommerce and I am sure that it exists in other cms / ecommerce / blog / whatever packages is that the add on's that you can install for features frequently alter tables. This can make upgrades of the basic system not work depending on how the code is written.

Its kind of a catch 22. If the plug in alters the table it may be more efficient but may affect upgrades. If the plug in adds a new table, you may have duplicate fields in the database, which creates management issues and may slow down the application. Say you have comments duplicated in two different places. Which one is the correct one if they are different?

For the stuff I write for myself, I create new tables and use those as a master table to update other tables. If you have a custom system, this shouldn't be an issue.

On Edit: One thing I ran into as well is changing packages. Oscommerce is older than Zen Cart and I want to convert to Zen. They use the same table structure. A plug in that I had on oscommerce changed the table structure and didn't allow Zen to work. You need to think ahead a bit when using packages like wordpress. It may be the blog of choice today, but if you want to change in a year, can you easily do that?

vangogh
10-09-2008, 07:28 PM
WordPress can export it's database as an XML file. I would think it's portable.

I'm not sure what plugin you used on osCommerce, but plugins should never alter the table structure of the basic application. It would be one thing to create a new table and use that, but to alter the existing tables would be a sign of an ineffective plugin.

I think when it comes to osCommerce it's so old that it's architecture wasn't setup for plugins. Newer CMSs are coded with it in mind that others will be extending the basic system. WordPress is certainly set up that way.

When it comes to moving your data from one application to another there are always issues of the data being compatible. Much of the time someone else has had the issue and released something to help you convert your data if necessary, but it is a good reason to take some time t choose an application. Just want to make clear this isn't a WordPress specific thing. It's a common issue with all applications, but much of the time there are existing tools to help you migrate.

orion_joel
10-09-2008, 09:27 PM
At this point i have no specific spam plug-in, the primary setting i have in Wordpress is that if there is more then two links in the comment send it to be approved. It really amazes me to say that 98% of the spam i am getting has 20+ links in it so never see's the light of anything except me hitting delete.

It was just those annoying ones that i was initially flagging as spam that i want to get rid of but cannot find in the admin section anymore. I will have to have a dig in phpmyadmin, should find it easily enough i thinks.

vangogh
10-09-2008, 11:28 PM
I'd definitely recommend getting a spam plugin. WordPress has Akismet installed by default. My own preference is Spam Karma 2, and I think Bad Behavior is another. Any of the three is worth adding.

billbenson
10-10-2008, 05:10 AM
I'm pretty sure it was a credit card plug in that collected the cvv info as well that messed me up going to zen cart. That is info you shouldn't be saving anyway.When I figured out why zen wasn't working I just deleted that column from the table and it installed fine as I recall.

When cart questions have come up here and elsewhere, the recommendation has always been around what is the easiest to install - aimed at the non programmer. Do you have any recommendations as to what is the best cart to use for the programmer?

I chose Zen Cart because it used css but had the same table design as oscommerce. When it comes down to it, you can change carts pretty easily as long as you can get your database in an excel sheet which oscommerce can do.

VG or anybody else, do you have any cart recommendations. It needs to be php mysql.

vangogh
10-10-2008, 01:28 PM
Strange about the plugin, but I can see it happening.

Most of the time I've worked with shopping carts it's been one that someone else has already installed and I wasn't crazy about using it. I've usually recommended Zen Cart for the reasons you mentioned. I'm beginning to explore other options such as adding a plugin to a CMS you don't first associate with a shopping cart.

I'm about to install Drupal along with the Ubercart plugin for it for on of my clients. Joomla is another CMS that should have cart related plugins. There are even shopping cart plugin for WordPress, which I'd like to explore. I'm thinking in the future I'll be recommending one of the above, though I haven't used any enough yet to really say which is my preferred option.

orion_joel
10-12-2008, 08:41 AM
Just a little update.

I finally got round to taking a look in phpmyadmin and as suggested the comments were very easy to find and a little search on the comments table simply for the word spam, as that seemed to be what was listed in the approved column for these comments and then select all and delete did the trick nicely. Now just have to do it for the other blog.

vangogh
10-12-2008, 02:18 PM
Nice that it was so easy. I knew it would be easy to find the comments table, but wasn't sure if there was a field set to mark comments as spam. Good to know there is, making it easy to delete them.

I'd still go with a spam plugin, in which case you'd likely want to leave the spam comments in the database so the plugin can compare new comments to what you consider spam. And again I'll recommend Spam Karma 2 (http://unknowngenius.com/blog/wordpress/spam-karma/)

KristineS
10-16-2008, 04:10 PM
I'd still go with a spam plugin, in which case you'd likely want to leave the spam comments in the database so the plugin can compare new comments to what you consider spam. And again I'll recommend Spam Karma 2 (http://unknowngenius.com/blog/wordpress/spam-karma/)

Do you like that better than WP Spam-Free?

vangogh
10-16-2008, 07:30 PM
I never used WP Spam-Free so I can't really compare. I do like Spam Karma 2 better than Akismet. I didn't care much for Akismet. Too many false positives and I didn't have as much control as I do with Spam Karma 2.

However I do know the Scott Allen, the developer of WP Spam-Free, to a degree and he's someone who knows his stuff and someone I would trust with development work. I would think he created a good plugin.

I just happened to use Spam Karma 2 before Scott developed WP Spam Free and being a creature of habit kept it. Maybe I'll give WP Spam Free a try.

Bad Behavior is another spam fighting plugin I've seen people recommend. I think they all generally work and different people will have different preferences. If WP Spam Free is working well for you I see no reason to change.