CommentLuv & Antispam Bee incompatibility

UPDATE: The author of the plugin has provided a way to make both plugins work together without changing the code (see the comments below). So you may just ignore my rambling below and go directly to my follow-up post that explains the exact procedure to make these plugins work together.

CommentLuv Editor ScreenshotWhen I installed the CommentLuv plugin on my blog, I wanted to make sure I can handle the additional comment spam that this would certainly cause. So I set out to find a good antispam plugin and managed to find it in the free AntiSpam Bee (I won’t go much into detail as to why I don’t use Akismet, suffice it to say that it is not free and it is controversial in many ways).

I soon had to discover though, that AntiSpam Bee is conflicting with the CommentLuv plugin. After a bit of tinkering, I found out why this is the case and can now show you a quick hack to get both of these to work together.

The problem comes from the fact that AntiSpam Bee replaces the standard comment entry textarea field by a duplicate. The original textarea field is hidden through CSS and is where commenting bots will leave their comments. The duplicate textarea field is the one that is shown to human commenters.

The CommentLuv plugin uses the original textarea field for some of its logic. This is what breaks it, as the original textarea field does not work as originally intended.
A simple change in the plugin’s commentluv.js file can correct this behaviour. I’ll show you how to do this below.

BEWARE: This is only a quick hack, not a definitive fix. It will simply be overwritten when the next update to CommentLuv gets installed.

  • You have to edit the commentluv.js file that’s included with the plugin. You can do this from right inside WordPress by opening the Plugins menu (1) and selecting the Editor (2).

CommentLuv AntiSpam Bee Conflict Resolution Screenshot 1

  • On the upper right side of the Editor, you first have to choose the correct plugin by opening the drop-down box (3) and selecting CommentLuv (4).

CommentLuv AntiSpam Bee Conflict Resolution Screenshot 2

  • Then you have to select the correct file to edit. Choose commentluv/js/commentluv.js in the list of files on the right (5).

CommentLuv AntiSpam Bee Conflict Resolution Screenshot 3

  • Now comes the tricky part. Look for the line that starts with ‘var comObj = [...]‘ . It mentions a textarea field and accesses its name property. This looks like the following: ‘jquery("textarea[name= " [...]‘ (6). Change the word ‘name‘ into ‘id‘.

CommentLuv AntiSpam Bee Conflict Resolution Screenshot 4

  • You finish by clicking the Update File button below the editor window (7).

CommentLuv AntiSpam Bee Conflict Resolution Screenshot 5

This should get rid of the error, and both plugins should now happily coexist. I hope this helps those people who try to run this combination of plugins.

I have introduced a support ticket through the wordpress.org site and assume that the author is working on a permanent fix. You can see the state of this ticket here.

Definitely give AntiSpam Bee a try if you haven’t done so already, it works wonders!

Comments

  1. Hi,

    you should be able to handle antispam bee compatibility without editing the commentluv code.

    just go to the technical settings area of the commentluv settings page in your dashboard and edit the name value for the textarea to use 96636-comment (that is for this comment form on this site)

    you can get the textarea name by right clicking the textarea and choosing ‘inspect element’ if you’re using google chrome or use firebug in firefox.

    this way you wont have to keep changing it every time you update the plugin.
    Andrew Bailey recently posted..CommentLuv Global Search EngineMy Profile

  2. Hi Andrew,
    Oh well, you are right. I thought that this number would randomly change, but so far it seems like it stays the same for my specific installation.
    Great, now I’ll have to change the whole article! ;) But I’m glad that there’s a clean solution available.
    Thanks for the fast feedback! …and thanks for the plugin! :)

  3. Thank you so much! I wanted to change my anti spam plugin but found anti spam bee to be bad for comment luv. Thought I’d have no choice than to stay with Akismet which seems to be of a legal problem in some countries. Your article has been very helpful! Do you know if the plugin’s author plans to implement the solution, too? – Tried to find the settings Andrew Bailey wrote about one comment above – didn’t. Where would one have to change the textarea name? So sorry if this is a dumb question…
    shelynx recently posted..Festliches Makeup – Weihnachten / Silvester 2012My Profile

  4. doesn’t commentluv offer free anti-spam add ons?
    Christopher James recently posted..Welcome to NubriMy Profile

  5. thanks alot I wanted to change my anti spam plugin a long time ago thanks again.

  6. Alain, I definitely second G.A.S.P., I use it all the time with my website and any websites I set up for my clients. It’s a life saver when it comes to controlling spam. Thanks for the tips on incompatibility.

  7. anti-technoogy totay bt il DEFINITY chaussé

  8. really v nice post like it
    Big Cartel Themes recently posted..Which Big Cartel Themes Work Best For Your Online BusinessMy Profile

  9. Its a great article on commentluve anti-spam bee incompatibility. Good work Keep it up and thanks for sharing such king of information.

    ______________
    Technology News

Speak Your Mind

*

CommentLuv badge