The Resend E-mails form (webform_submission_resend()) fails to validate the selected email addresses.

This is because $form_state['values']['resend'] is replaced with the value of the submit element at $form['actions']['resend']. I believe this is due to $form['actions']['#tree'] = FALSE, which was added in SHA 5d941be. Removing that line fixes the form, and it passes validation.

I'm attaching a patch that rolls back this change. It's not clear from the commit log why it was added in the first place, and this patch may break whatever it was trying to fix, but hopefully it'll help get the ball rolling.

Comments

aitala’s picture

Oddly I just ran into this issue today as well - especially since its the first time I've ever needed to re-send a form submission.

Patch seems to work fine, but I rolled it back since I don't think I will need to use it again for some time.

Thanks.

quicksketch’s picture

Hm, strange. Thanks for the patch! I can't figure why #tree would be set to TRUE either. I'll test this out and apply after checking the results before and after.

quicksketch’s picture

Status: Needs review » Fixed

I think this may have had to do with #734208: Containers/divs for components, where we made all the wrappers around the buttons consistently named "actions". I think the #tree part was used in other places to specifically make certain IDs present. In this case, clearly the #tree is hurting us rather than helping, so I've removed the #tree line exactly as done in the original patch. Thanks! Committed to 6.x-3.x branch only, since it's the only affected version.

Status: Fixed » Closed (fixed)

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