Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When submitting an empty comment, spam module scans it, categorizes it as spam, and gives the user an error message (or even worse, redirects to the front page with that setting on). Instead, it shouldn't do anything at all, and let the standard form validation error do its thing.
Comment | File | Size | Author |
---|---|---|---|
#2 | spam-spam_scan_should_not_be_called_on_empty_issues-744428.patch | 760 bytes | darrell_ulm |
spam_allow_empty.patch | 977 bytes | mcarbone |
Comments
Comment #1
gnassar CreditAttribution: gnassar commentedEmpty comments return the standard form validation error. This must've been fixed between now and then, I'm guessing. Please re-open with more detail if this still occurs for you.
Comment #2
darrell_ulm CreditAttribution: darrell_ulm commentedHello. Here is the same patch ported to version 6.x-1.4. I can reproduce this issue.
Thanks,
Comment #3
AlexisWilke CreditAttribution: AlexisWilke commentedHi guys,
I committed this patch. I don't see a reason for it causing any kind of trouble and it makes sense to not even try to check an empty buffer (and thinking about it we probably have the same problem with nodes, but that's less of a problem there I would imagine.)
Now what I'm wondering about is... why on Earth was a session used for a global variable?! Session data is saved in the database!!! DEAD SLOW. I'll have to check on that but I would imagine that this $_SESSION['spam_form'] is temporary and thus doesn't need to be in a session. But that's a different issue! See: #712624: Unnecessary session data being stored
Thank you.
Alexis
Comment #4
AlexisWilke CreditAttribution: AlexisWilke commentedFYI, I just noticed that I had not pushed the changes... It will be in the next dev version. Sorry for the delay.
Alexis