When you use Spam Karma 2 with WP-Cache, cached files are not flushed after a successfully comment approval.
That’s basically because SK2 intercepts some actions, so WP-Cache will not get notified.
I create a small plug-in for SK2, which will directly call wp-cache to flush cache, after a comment is approved.
Download this zip, extract and drop the php into sk2_plugins directory, it should just work.
Note:
- wp-cache 2.1.0 is out, please install 2.1.0 and delete old cache before you complain this compatibility plug-in is not working.
- Turn off ‘encrypted payload’ check in sk2, see the reason updated below.
Updated: There’s a problem discovered by Reiner, sk2 generates some dynamic hidden field to check if the page is really loaded by a browser before the comment is posted.
The ‘encrypted payload’ plug-in will cause the biggest problem, since it contains an ‘ip’ field that generated base upon client’s ip.
With wp-cache, encrypted payload is fixed, so the ip will not match the real commenter’s ip. IP mismatch will cause a minus 2.5 karma, which will prevent many normal comments comes in.
Thanks for the plugin
You’re a star priv!
Pingback: How To Fix WP-Cache And Spam Karma 2 (SK2) Issues » Connected Internet
Pingback: WordPress: WP-Cache acting funny? » Solo Technology
Pingback: WordPress Wednesday: Custom Fields Contest and Lots of WordPress.com News at The Blog Herald
Pingback: Reiner Saddey’s Place » Why WP-Cache and Spam Preventers like Spam Karma 2.1 will never work in harmony
Pingback: Making SK2 and WP-Cache play together » Ajay - On the Road called Life!
Hi,
I’m facing one problem. I have comment moderation enabled and when I approve a comment, the cache doesn’t seem to get flushed.
The flushing works only on unmoderated comments.
Ajay
Strange since I cannot reproduce.
There happens to be a comment is awaiting moderation just a few minutes ago, so I approve it in comment->awaiting moderation, the cache gets flushed.
And I tried more way to do that, when I approve/unapprove/delete in comments->comments, or select recover comments in sk2->recent spam harvest, the cache also gets flushed.
Currently the only problem I see is when I do ‘moderate selected’ in sk2->Approved Comments, the cache will not be flushed so the spam will not gone in post.
If you still get this problem please help me with more detailed reproducing steps then I can help.
Worked just great at my site! Thanks for this fix! =)
Pingback: HTMLHelp.blog : The HTMLHelp.blog Theme and Plugin Page
Pingback: Akismet False Positives & Spam Karma Configuration | Andy Beard - Niche Marketing
Pingback: Quix0r's Personal Weblog
you don’t have to turn off completely encrypted payload. Also if you do it you’ll be breaking the stopwatch plugin too.
Here is demonstrated how to keep those two plugins active:
http://mu.wordpress.org/forums/topic.php?id=2296&page=2&replies=45#post-31086
Pingback: Wordpress plugins and hacks | ChillyCool Web Digger
Pingback: Spam Karma 2 And WP-Cache Compatibility Issues! And How To Solve Them? » D’ Technology Weblog: Technology News & Reviews
Pingback: Usare Spam Karma 2 e WP-Cache assieme e senza problemi | Davide Salerno
Pingback: | Molrak.com
Hey Priv, great patch. Will this plugin work with SK2 and WP SUPER CACHE?
No I don’t think so. This plug-in directly calls WP-Cache function to flush. It’s unlikely that other cache plug-ins will have same function name all calling convention.
Pingback: jim arnold : Fixing comments in Wordpress while running Spam Karma and WP-cache
I thought I had this fixed and posted a blog entry about it (actually that’s me above), but it turns out what I did has not fixed the delay in comments being posted to our blogs. I have the latest versions of WP-Cache and SK2, deleted old cache and turned off ‘encrypted payload’ check in sk2.
If you see my blog entry above I’ve even made the changes mentioned by the user Quenting about half way down on this page: http://mu.wordpress.org/forums/topic.php?id=2296&page=2&replies=45
Sometimes the comments show up immediately and other times they take a half hour. I am also running Akismet. Should I not be running that along with SK2 and WP-cache?
I’m ready to give up on either WP-cache or SK2 just to get comments to appear when posted by the user.
Any thoughts?
Thanks,
Jim
Priv,
FYI, when I submitted my previous comment on this site it did not appear. Looks like your fix is not working on your site either.
Well I have no idea, I haven’t tested it with the latest version of WP for a long time, it might works, it might not.
Sometimes ISP’s transparent proxy interfere the behavior, I need to shift-reload to get the latest page, but I’m actually haven’t run into real problem about the comments for long on my Chinese blog(which is more commented)
Priv,
I’m running 5 or 6 blogs where I’ve tried the commenting fix. I’ve noted that it’s inconsistent as to whether you will see your comment right away once you click the submit button.
As you noted, doing a super reload to will get the page to reload to show the comment, but to the ordinary person they don’t know to do this and to them their comment was not left.
Just to prove my point, when I left the message above I saw it immediately after hitting the submit button.
The message I left at 01.31.08 at 1:07 pm was not seen immediately when I submitted it.
You may need to update your page to reflect we still have a conflict between SK2 and WP-cache.
Thanks a lot for the assistance in getting SK2 and WP Cache to play along.
Pingback: The Law of Unintended Consequences at Center for REALTOR® Technology Web Log
Before I have same problem with you. And thanks you for your post.
This is a big problem when comments are coming in full steam ahead. Caching has its goods and bads…and unfortunately caching and comments don’t co-exist well. I hope this plugin helps.
Thanks for the info,
Richard
Pingback: Wordpress Plugin Center - Priv s Blog SK2-WP-Cache-Compatibility plugin (WP Comment Plugin)
Pingback: Priv s Blog SK2-WP-Cache-Compatibility (WP Comment Plugin) plugin | www.TheWordpressPlugin.com
Hi! Good post! I needed to know such kind of information to update myself. I’m into Real Estate and need to know what’s new in the market. Thanks for the information.
Pingback: Wordpress plugins and hacks — Blog a Living