Here is the fix for the helpful Conditional Captcha plugin so that it continues to run properly on WordPress version 5.5 and later…
The fix is very simple. Edit the plugin’s main file wp-conditional-captcha.php
…and change line 351 from:
elseif( !is_user_logged_in() && empty( $comment['comment_type'] ) && empty( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && ( !defined( 'XMLRPC_REQUEST' ) || !XMLRPC_REQUEST ) ) {
to:
elseif( !is_user_logged_in() && ( empty( $comment['comment_type'] ) || $comment['comment_type'] == 'comment' ) && empty( $_SERVER['HTTP_X_REQUESTED_WITH'] ) && ( !defined( 'XMLRPC_REQUEST' ) || !XMLRPC_REQUEST ) ) {
Explanation:
The problem was brought on in WordPress 5.5 where the WP team decided to change the default comment_type to be ‘comment’ rather than blank (as it had always been previously).
This broke the plugin, which was testing for an empty comment_type field to check for a standard comment. The result is no comments were being processed after upgrading to WP 5.5 or later.
But it’s a simple one-line change to the code, and I hope the plugin author @solarissmoke incorporates this tweak into the official plugin distribution!
Details:
See the section, “Comments: default comment_type value now enforced”
]]>
Hi,
Is there anyone who is using the Conditional CAPTCHA plugin and after updating to WP 5.5 or 5.5.1, this plugin broke down or caused issues with the site, or everything kept working without any problem?
]]>Hi,
can you please update this plugin to work with the latest WordPress v5.5.0 update?
Thanks in advance,
Julian
https://www.google.com/recaptcha/intro/v3.html
Now that recapctha version 3 has been released when the plugin was updated?
]]>The script must be in Head, otherwise not always shown
https://developers.google.com/recaptcha/docs/display#auto_render
Sorry for my English
]]>The first version stopped working, update please.
]]>PHP Warning: printf(): Too few arguments in ...wp-content/plugins/wp-conditional-captcha/wp-conditional-captcha.php on line 184
Please fixed
]]>Hello.
Add in “Page captcha” the ability to install the html tag:
<meta name="viewport" content="width=device-width" />
Sorry for my English
]]>Hello.
Add in “Page captcha” the ability to install the html tag:
<meta name="viewport" content="width=device-width" />
Sorry for my English
]]>Hi, excellent plugin I’ve used for years.
I don’t know what happened and when but when someone completes the CAPTCHA and it gets sent to the moderation queue, the escaped apostrophes still appear escaped ( \’ ). I have to edit the comments and remove the backlashes.
Is there a quick fix?
]]>This plugin seems specific to comments with Akismet enhancement. Will it interfere with a general use captcha plugin for logins, contact form, registration etc. I need for it to work with woocommerce, MemberPress and BuddyPress. Thanks
]]>Hi Samir,
Your great plugin used to work fine, but may need an update since I have now plenty of spam comments!
Thank you by advance for your help,
Regards
Hi there,
I’ve just installed the plugin on my site and have set up with reCaptcha (new), but I can’t see whether it’s working. I posted a comment with viagra as suggested in the FAQ, but I still didn’t get to see the captcha, my comment just went straight in to the moderation queue.
]]>Can this plugin be used to stop Registration spam or is it for Comment spam only.
I’m looking for a plugin that uses No Captcha Recaptcha on the WordPress account registration forms.
Thanks.
]]>Hi there,
Really love this plugin ?? Have been using it for quite some time, and am just now wondering what the “Prevent Akismet from checking logged in users” setting does. I visited the Akismet settings and website and couldn’t find any information on this.
Thanks!
]]>Since some days (maybe since last update? not sure), I see some PHP errors being logged.
It is always this same line:
[Jan 06, 13:25:49] PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given in /wp-content/plugins/wp-conditional-captcha/wp-conditional-captcha.php on line 406
May that be due to some attempt of XSS attack via comments?
Of note, I dont use JetPack Comments.
What do you think?
]]>Would love to see it implemented since it uses the same API keys than classic reCaptcha ??
]]>Hi,
I feel like I’m getting hammered by spam more than usual lately. I’m using the latest version of Askimet. Have you noticed any conflicts with this plugin lately?
]]>Is it possible to configure Conditional Captcha to use Basic Mode AND Akismet?
Akismet is catching a lot of spam (some 10,000 in September so far) but there is still quite a few spam that get through. Some 5-10 per day.
Therefore it would be good to be able to serve a Captcha for any user that has not already at least one approved comment.
Obvioiusly I do not want to disable Akismet since it is catching a lot of spam, but I would still like Conditional Captcha to serve a captcha for anyone who has not at least one approved comment.
]]>I am using twenty-eleven theme and installed this plugin to help reduce comment spam. But, the settings page is blank and no captcha appears when I comment after logging out, etc.
]]>Just to let the plugin author know that (for reasons unknown to me) the language code in the Finnish edition of WordPress is “fi” and not “fi_FI”. Renaming the .po and .mo files does the trick but for future reference.
]]>I tried to trigger this plugin by submitting a spammy comment with spammy words and link. Akismet caught it as spam yet I never saw the captcha page. What’s wrong? How do I trigger this to test.
]]>Hi! I love this plugin. That’s why I wanted to report this thing I’m noticing: It is generating a lot of PHP errors. I’m running WP 3.9.1 on server with PHP 5.4.29 and this is found repeatedly in the errorlog at root folder:
[12-Jun-2014 02:36:06 UTC] PHP Warning: stripslashes() expects parameter 1 to be string, array given in /home/MYSITE/public_html/blog/wp-content/plugins/wp-conditional-captcha/wp-conditional-captcha.php on line 414
I’m sure is not critical, since it is still blocking the spam, but would be nice if the errorlog don’t get flooded with this in several websites ??
Hope you can find the bug anytime soon.
Thanks!
]]>Hi,
I’d like to use your plugin because I really love the simple/strong captcha text-based method and the fact that it is not served every time.
My website has two languages that I manage with the Polylang plugin (similar to WPML). Unfortunately the captcha screen always shows the italian text, either if I’m commenting an italian or an english post/page.
How can I fix this issue? Language is important in your text-based captcha! ??
Thanks
Daniele
Hello,
Great job with your plugin! It has really reduced the number of spam comments we receive. Would you mind tagging your last release in the SVN repository? I’m using SVN externals to update plugins and the 3.6.1 tag has not be created yet.
Thank you ??
I have basic WordPress discussion settings setup so someone has to have registered and replied to an email link, (via Login Widget Pro) and then be logged in to comment… And then after that must have their first comment moderated…
When using the viagra-test-123 there is no captcha before moderation, and Akismet doesn’t seem to catch it either… After a first comment is moderated Akismet will stop a second comment with the viagra test, BUT, still no captcha…
More importantly, and why I am trying this plugin, bbPress which is installed does not get moderated (WP moderation doesn’t include bbPress), though people must still have registered and be logged in to post a topic or reply… Akismet is hooked into the forums and does catch a viagra test topic, but again no captcha… That is where I’m looking for it most, though it wouldn’t hurt to have it for comments as well…
This is a new site soon to go out to an email list, and am attempting some last refinements…
]]>I can’t come up with another explanation. Here’s what happens:
Usually, Akismet marks something as spam, the plugin checks it and trashes it (I have the settings marked to do that).
Occasionally, Akismet marks something as spam, but the plugin just leaves it in the spam queue.
Since the plugin is set to either trash a comment or marks it as not spam (back into moderation), nothing should be in my spam queue.
What’s going on?
]]>With Jetpack installed, Akismet scans my Contact Us form (provided by Jetpack).
Does Conditional CAPTCHA present a CAPTCHA to contact messages tagged SPAM by Akismet on this form?
]]>I am currently running this plug in with the Akismet function. However, I am still getting tons of Spam comments and they are causing very high server usage. Aksimet is blocking them, but they are still reaching my site even though they are being caught before being posted.
My web host suggested a plug in that will catch spam before it makes it through the comments. So I want to switch to the mode that requires everyone to complete the form the first time they comment. But I can’t figure out how to switch to basic mode. Can you help me?
Also, I guess i want to confirm that this will address my problem by preventing (most) spam from getting through rather than making it into comments first and then being caught. Thanks!
]]>From the FAQ:
What about the default WordPress comment settings?
All the default settings have priority (so it is recommended that you turn off the “Comment must be manually approved” and “Comment author must have a previously approved comment” settings as they will prevent the plugin from having any effect!).
If I choose to leave manual approval in place, won’t this plugin still help Akismet manage the spam?
How does the previously approved setting affect this plugin doing its job?
]]>