Download & Extend

Page Not Found when deleting submission without destination parameter set

Project:Webform
Version:5.x-2.1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

webform is trying to redirect to "node//results" when deleting submission with no destination parameter set.
The problem is $form_values['nid'] is empty, changing it to $form_values['node']->nid fixed the problem.

function webform_submission_delete_form_submit($form_id, $form_values) {
  webform_submission_delete($form_values['node'], $form_values['submission']);
  drupal_set_message(t("Submission deleted."));
  return 'node/'. $form_values['nid'] .'/results';
}

Comments

#1

Status:active» reviewed & tested by the community

Thanks, you're right. I'll make this change as soon as I clean up some other patches in progress.

#2

#3

Status:fixed» closed (fixed)

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