I have a webform that refuses to send e-mails. The submission is created but no emails are sent. I am bug hunting and more or less by chance visited the "Resend E-mails" for a submission,

I'll post a screenshot of it. Both e-mails are checked, but the form complains that "You must select at least one email address to resend submission" when I press the "Resend e-mails" button.

Could this bug be related to the form not sending emails? If not, it's still a bug.

As I mentioned, no e-mails are sent at submission creation. That's a different issue, but I'll start with this one, ironing out possible culprits.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjt1224’s picture

Well this issue is a simple fix. In line 453 of the file webform/includes/webform.submissions.inc.

$form['actions']['sendemail'] = array(
      '#type' => 'submit',
      '#value' => t('Resend e-mails'),
    );

Just need to change the name of the submit button from resend to "sendemail'.
The issue deals with form input types name declared for the check as being overridden by the submit button in the same function "webform_submission_resend" at the end which nullifies the value on Submission of the Form.

jtjones23’s picture

I can confirm that #1 worked for me. I was getting the same error message.

jerry’s picture

Yep, #1 worked for me as well.

quicksketch’s picture

Huh, weird. We've had a lot of issues with these buttons recently. The proposed fix sounds good; seems like something we should do to all versions just for clarity.

quicksketch’s picture

Version: 6.x-3.19 » 6.x-3.20
Status: Active » Fixed
FileSize
507 bytes

Thanks guys, I've replaced "resend" with "submit" in all branches (though this problem seemingly only affected Drupal 6 sites). Note that 6.x-3.20 that came out today does *not* include this fix, it'll be in 3.21.

quicksketch’s picture

Title: Resend e-mails » Resend e-mails does not work in 6.x-3.20

Status: Fixed » Closed (fixed)

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

fenstrat’s picture

Version: 6.x-3.20 » 8.x-4.x-dev
Assigned: Unassigned » fenstrat
Status: Closed (fixed) » Patch (to be ported)

Needs porting to 8.x-4.x.

fenstrat’s picture

Version: 8.x-4.x-dev » 6.x-3.20
Assigned: fenstrat » Unassigned
Status: Patch (to be ported) » Fixed

Committed and pushed bc01194 to 8.x-4.x. Thanks!

  • Commit 2e286f5 on 8.x-4.x by fenstrat:
    Issue #2152409 by quicksketch | Boletus: Resend e-mails does not work in...

Status: Fixed » Closed (fixed)

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