You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The reason will be displayed to describe this comment to others. Learn more.
@tractorcow This breaks any protector that uses a Text Field for the value as the value will be saved into the database. IsSpam should be internal and not presented to the user right? For example Math Spam Protection now saves the value of the answer into the database (i.e 10) which evaluates to true and therefore makes it all as spam.
My feeling is to rename this name away from IsSpam, protectors can always write back to the form data using getForm(). If you really want to keep IsSpam then we need to update all the protectors we support.
The reason will be displayed to describe this comment to others. Learn more.
I suggest a FlagField option to specify the boolean field to save into, although I'd imagine that making this a core api in spam protector would require each of the other modules to be updated. Can it be done in a non-breaking way? (old spamprotector / new field or new spamprotector / old field?)
c40d120
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tractorcow This breaks any protector that uses a Text Field for the value as the value will be saved into the database. IsSpam should be internal and not presented to the user right? For example Math Spam Protection now saves the value of the answer into the database (i.e 10) which evaluates to true and therefore makes it all as spam.
My feeling is to rename this name away from IsSpam, protectors can always write back to the form data using
getForm()
. If you really want to keep IsSpam then we need to update all the protectors we support.c40d120
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh dear, I think you're right.
Can we add a new API that separates the "Sets IsSpam flag" from the actual name of the field? (which probably should be left up to the protector).
As long as we can still save spam if using the akismet field (https://github.com/silverstripe/silverstripe-akismet#comments) I'm flexible on how that is actually done. :)
c40d120
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest a
FlagField
option to specify the boolean field to save into, although I'd imagine that making this a core api in spam protector would require each of the other modules to be updated. Can it be done in a non-breaking way? (old spamprotector / new field or new spamprotector / old field?)c40d120
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've raised an issue at silverstripe/silverstripe-spamprotection#22
I'm really not sure if there's a clear way to approach this.