Mar 8th, 2010, 5:22 AM
Thanks, Ben. I appreciate the fix. I'll employ it and have the client let me know if he see's any more problems.
(Mar 7th, 2010, 11:00 AM)Ben Wrote: Damn... this is a bug. I refactored the ft_api_process_form() function a little while back and must have missed this. Drat!
I know this isn't ideal, but you can fix this by manually changing your api.php file. Assuming all goes well I'll include this fix in the next API version so that you'll be able to upgrade safely.
Here's how to do it.
1. Edit your /global/api/api.php file,
2. Scroll down to line 850. You should see this chunk of code:
PHP Code:if ($passes_captcha && !empty($next_page) && !$is_deleting_file)
{
// if the user wasn't putting through a test submission or initializing the form, we can send safely
// send emails at this juncture, but ONLY if it was just finalized
if ($form_id != "test" && $submission_id != "test" && !isset($_SESSION[$namespace]["form_tools_initialize_form"]))
{
// send any emails attached to the on_submission trigger
if ($is_finalized == "yes")
ft_send_emails("on_submission", $form_id, $submission_id);
}
header("location: $next_page");
exit;
}
Change it to this:
PHP Code:if ($passes_captcha && !empty($next_page) && !$is_deleting_file)
{
// if the user wasn't putting through a test submission or initializing the form, we can send safely
// send emails at this juncture, but ONLY if it was just finalized
if ($form_id != "test" && $submission_id != "test" && !isset($_SESSION[$namespace]["form_tools_initialize_form"])
&& !isset($form_data["form_tools_ignore_submission"]))
{
// send any emails attached to the on_submission trigger
if ($is_finalized == "yes")
ft_send_emails("on_submission", $form_id, $submission_id);
}
header("location: $next_page");
exit;
}
I haven't confirmed this fix, so you're going to be the Beta tester I'm afraid.But it should work fine.
Let me know how it goes.
- Ben