Problem/Motivation

I'm getting spammed with this error message in my logs (which emails us).

Warning: Undefined array key "message" in Drupal\spamaway\Plugin\WebformHandler\AntiSpamHandler->validateFormWithSavedSubmissions() (line 388 of modules/contrib/spamaway/src/Plugin/WebformHandler/AntiSpamHandler.php) #0 core/includes/bootstrap.inc(164): _drupal_error_handler_real()
#1 modules/contrib/spamaway/src/Plugin/WebformHandler/AntiSpamHandler.php(388): _drupal_error_handler()
#2 modules/contrib/spamaway/src/Plugin/WebformHandler/AntiSpamHandler.php(305): Drupal\spamaway\Plugin\WebformHandler\AntiSpamHandler->validateFormWithSavedSubmissions()
#3 modules/contrib/webform/src/Entity/Webform.php(2765): Drupal\spamaway\Plugin\WebformHandler\AntiSpamHandler->validateForm()
#4 modules/contrib/webform/src/WebformSubmissionForm.php(1887): Drupal\webform\Entity\Webform->invokeHandlers()
#5 [internal function]: Drupal\webform\WebformSubmissionForm->validateForm()

Steps to reproduce

  1. Add the default settings to an existing webform (with a message field)
  2. Submit webform

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork spamaway-3415692

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joelpittet created an issue. See original summary.

joelpittet’s picture

Category: Bug report » Feature request

Turns out we accidently put the field name as Message instead of message. This problem might be solved as user error, though a validation would be nice, maybe this should be a feature request?

chetan 11’s picture

Assigned: Unassigned » chetan 11

chetan 11’s picture

Assigned: chetan 11 » Unassigned
Status: Active » Needs review

Please check the above MR.

joelpittet’s picture

Oh wow @chetan 11, I'll take a look right away! Thanks!