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.

Comments

Anonymous’s picture

Janner created an issue. See original summary.

kala4ek’s picture

Priority: Normal » Major
sergeyshadrin’s picture

@Janner please apply patch and check if the problem remains

Anonymous’s picture

Thank 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.

kala4ek’s picture

Status: Active » Needs work
Issue tags: +Needs tests

Ok, need test to cover such issue

  • kala4ek committed 99ab443 on 8.x-1.x authored by SergeyShadrin
    Issue #3161424 by SergeyShadrin, Janner, kala4ek: “Check if this account...
kala4ek’s picture

Status: Needs work » Fixed
Issue tags: -Needs tests

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.