FriendlyCaptcha / friendly-captcha-wordpress

WordPress plugin for Friendly Captcha. Protect WordPress website forms from spam and abuse with Friendly Captcha, a privacy-first anti-bot solution.
https://friendlycaptcha.com
19 stars 9 forks source link

Also support captcha for the standard wordpress comments #4

Closed Coernel82 closed 3 years ago

Coernel82 commented 3 years ago

Please make the plugin support the standard wordpress comment section

StefanGold commented 3 years ago

This is a must have, without this, it is more or less useless

Please add this!

Thanks you

StefanGold commented 3 years ago

Any news about that?

gzuidhof commented 3 years ago

I hope to ship support for Wordpress comments later this week, please bear with me :). It's on my to do list!

StefanGold commented 3 years ago

THANK YOU, very good to hear this!

gzuidhof commented 3 years ago

I just pushed version 1.1.0 which has support for Wordpress comments :)

@dev-love could you push this to the Wordpress Plugins marketplace?

StefanGold commented 3 years ago

super fast, thank you

Coernel82 commented 3 years ago

I manually installed 1.1.0. I can confirm German localization but the captcha is not working on the comments.

You can try it here: https://www.cornelius-berger.de/blog-zum-thema-gesang-und-gesangstechnik/der-unterschied-zwischen-funktionellem-gesangsunterricht-und-stimmtherapie

I will monitor that blog entry so you can really try to write a comment.

gzuidhof commented 3 years ago

Thank you for letting me know

I'm not able to reproduce the issue locally, looking at the source of the page I do see that the <div> is added to the page, but the script appears to be missing. Which puzzles me - they both get added in the same go.

Could you maybe try and see if the captcha does show up if you enable it for another integration (such as the "password reset" feature)?

Maybe there's a different plugin that's causing troubles. Could you let me know what version of Wordpress you are on so I can try to reproduce it locally?

gzuidhof commented 3 years ago

Aha - it looks like the Javascript code for Friendly Captcha is there, but it doesn't get executed because of an error. It seems like Wordpress combines the scripts into one.

See this screenshot:

image

I wonder if there is a way to disconnect our clientside code from other modules so this can't happen.

gzuidhof commented 3 years ago

Could you try to fix the issue it states (it seems like you need to swap to a different jQuery version), or try disabling the "AutoOptimize" plugin if you are using that?

Coernel82 commented 3 years ago

Yes AutoOptimize is running. What is the name of your JavaScript? This then can be disabled manually. You should document or even autodetec this AutoOptimize issue as AutoOptimize is extremely common. So the plugin could say: "You are using AutoOptimize" please add "friendlycaptcha.js" or whatever it is called to the "Do not optimize" section in AutoOptimize.

gzuidhof commented 3 years ago

I will give AutoOptimize a try and give you the answer, and we can add a tip to the docs/readme.

A warning: It's not just FriendlyCaptcha's scripts that don't get executed here. There is no issue with the combination of FriendlyCaptcha and AutoOptimize - the issue is in how AutoOptimize doesn't handle script exceptions. Bootstrap is misbehaving (it is lacking the correct dependency), but generally if any script throws an uncaught exception any subsequent scripts will simply not be evaluated. This may cause other issues down the line making it worth fixing even if you can add exceptions.

Coernel82 commented 3 years ago

Adding widget.module.min.js to AutoOptimize Exceptions will solve the issue with AutoOptimize.