silverstripe / silverstripe-mathspamprotection

BSD 3-Clause "New" or "Revised" License
19 stars 20 forks source link

doesn't work with latest userforms version #32

Open guyvanbael opened 8 years ago

guyvanbael commented 8 years ago

When i updated to the latest userforms module, filling in the mathspamprotection field always result in "this field is required". Form can't be submitted anymore.

Taitava commented 8 years ago

I can confirm this. I'll try to see what's wrong and will get back if I find anything. In the mean time, if anybody has any clue about this, please tell :). I can't promise any solution yet.

tractorcow commented 8 years ago

Is it a server side or client side validation which is blocking submission?

Taitava commented 8 years ago

@tractorcow It's server side. I have real time validation disabled.

tractorcow commented 8 years ago

I remember fixing userforms a while back to work with the spam protector; I'll check if the code still works. ;)

You are using the EditableSpamProtector field, right?

guyvanbael commented 8 years ago

yes, i am.

Taitava commented 8 years ago

Me too.

tazzydemon commented 8 years ago

The way validation is handled appears to have changed enormously on Userforms 3.x and as far as I can tell has broken all the standard spamprotection modules including mine which was an upgrade of the old honeypot. I have asked elsewhere for the api instructions or description for how this has changed?

guyvanbael commented 8 years ago

Thanks for looking into it. Meanwhile i'm using the invisiblespamprotection module, but the mathspamprotection always did a great job!

tazzydemon commented 8 years ago

Are you saying that invisiblespamprotection works for you in Userforms 3.x? It doesn't for me

guyvanbael commented 8 years ago

Yes it does, but it isn't half as effective as mathspamprotection

tazzydemon commented 8 years ago

I cant find any evidence that it works with userforms 3. I can fill in the honeypot on any of the various versions including mine and the form does not get returned but submitted. Curious

tazzydemon commented 8 years ago

The problem was my selected version of silverstripe-spamprotection which has to be 2.0.2+ (or master) There was a key commit made here: https://github.com/silverstripe/silverstripe-spamprotection/commit/da87f71a158905b4732aa21bc20c4833260a7dfb

guyvanbael commented 8 years ago

So did you get mathspamprotection working again? These are my entries in my composer file, but it doesn't seem to work. "silverstripe/spamprotection": "", "silverstripe/userforms": "dev-master", "silverstripe/mathspamprotection":"",

tazzydemon commented 8 years ago

You missed this line in composer.json "silverstripe/spamprotection": "~2.0.2",

You also need a spamprotection.yml in your _config directory with this in it:

---
name: spamprotection
---
FormSpamProtectionExtension:
#  default_spam_protector:
  default_spam_protector:  MathSpamProtector
tazzydemon commented 8 years ago

By the way I have found the problem and will post an issue fix

Taitava commented 8 years ago

@tazzydemon Hi, have you made any progress with the fix? Or can you provide further information about the problem? Thanks a lot! :)

tazzydemon commented 8 years ago

Because I'm not using this module I didn't fork and pull request like I did with silverstripe-spamprotection but if you check out issue 42 you will see the fix https://github.com/silverstripe/silverstripe-mathspamprotection/issues/42