Over in #414294: Option to resend emails when submission is modified, it's been reported that the "Resend e-mails" feature is not working:

From @drupalNIdaho:

I'm trying to use the Resend Emails function and I receive the following error mss:

warning: array_filter() [function.array-filter]: The first argument should be an array in /home/sharonm/public_html/modules/webform/includes/webform.submissions.inc on line 469.
You must select at least one email address to resend submission.

I'm selecting two email addresses, so I don't understand the last statement.

Workflow is: Go to webform. Open Results tab. Click View (also happens with Edit). Click "Resend e-mails" (the Resend emails page displays). Check the boxes of an email or emails. Click the Resend e-mails button. Receive the error message above (and no one receives the resent form). I tried this editing the form and not editing the form (just resending it). But it does not work.

Can anyone decipher the above message?

Comments

quicksketch’s picture

Version: 7.x-3.19 » 6.x-3.19

Both reports we've received have been from 6.x-3.x users actually, so maybe this is a D6 specific problem.

Becker-and-Becker’s picture

subscribe

mula’s picture

I think this bug is embedded between the version 3.18 and 3.19.

This problem does not occur with the following code:
(webform-6.x-3.18, includes/webform.submissions.inc, line:449):

    $form['actions'] = array('#type' => 'markup');

This problem occurs in the following code:
(webform-6.x-3.19, includes/webform.submissions.inc, line:449)

    $form['actions'] = array(
      '#type' => 'markup',
      '#tree' => FALSE,
    );
vglocus’s picture

The resulting $form_state['values']['resend'] array, which should come from $form['resend'] has been replaced with the value set in component $form['action']['resend']. It is simply the string "Resend E-mails"

drupalNIdaho’s picture

I'm not sure what you guys are suggesting the solution is? Scratching my head....

iuk2’s picture

I am getting similar error when I try resend : "You must select at least one email address to resend submission."

karing’s picture

Seeing this on a D6 site using 6.x-3.19 as well. Making the edit in #4 indeed makes things work again.

stewart.adam’s picture

This appears to be fixed in git - try using latest dev.

eiriksm’s picture

Status: Active » Closed (duplicate)

This was fixed in http://drupalcode.org/project/webform.git/commit/e0d9e1e88cb1e9b7a64ef35...

It is also reported in #2013176: Resend E-mails form fails validation on every submit

So for the ones looking for the fix. Do either of the following:

- Download the latest -dev version of the module.

OR

- Remove line 451 in includes/webform.submissions.inc that looks like this:

'#tree' => FALSE,

Marking as duplicate

vermontdevil’s picture

I've checked this and I do not have the '#tree' => FALSE in the code.

Yet I'm still unable to resend any of the submitted webforms.

I'm using 6.x-3.19 on Drupal 6.29