When clicking on the “Check if this account matches a known spammer” link on a user profile's Spam tab the page throws an unexpected error message and the following PHP error is added to Watchdog:
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT DISTINCT comment_field_data.hostname AS hostname FROM {comment_field_data} comment_field_data WHERE cid = :db_condition_placeholder_0:db_condition_placeholder_1; Array ( [:db_condition_placeholder_0] => 113078 [:db_condition_placeholder_1] => 115232 ) in spambot_account_ip_addresses() (line 259 of /home/public_html/modules/contrib/spambot/spambot.module).
The query to StopForumSpam appears to be processed though, as a confirmation message of this appears in Watchdog.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | check_account_matches_a_known_spammer-3161424-3.patch | 475 bytes | sergeyshadrin |
Comments
Comment #1
Anonymous (not verified) commentedJanner created an issue. See original summary.
Comment #2
kala4ekComment #3
sergeyshadrin commented@Janner please apply patch and check if the problem remains
Comment #4
Anonymous (not verified) commentedThank you for investigating this.
The patch appears to resolve the problem -
The user profile page now displays an appropriate message after using the link, such as “No matches against known spammers found.”
And Watchdog contains “success” messages from Spambot.
Comment #5
kala4ekOk, need test to cover such issue
Comment #7
kala4ek