Needs work
Project:
Ajax
Version:
6.x-1.9
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Sep 2011 at 18:58 UTC
Updated:
21 Jan 2012 at 08:42 UTC
Not sure why this happens, but I've modified a webform to submit the form on the last page of the webform only. However, when a user clicks the "Previous page" button, it also fires the Ajax submit hook even though it shouldn't be. I spent a few hours trying to figure it out, but couldn't for the life of me determine why (the button wasn't getting the class that should have caused it to fire). Ultimately, I made the following fix in ajax.module:
function ajax_submitter(&$form, &$form_state) {
// Only fire on ajax.
if (!isset($_POST['drupal_ajax'])) {
return;
}
$messages = drupal_get_messages(NULL, TRUE);
This fixed the issue. Sorry for not creating a patch, but I figured that is easy enough for you.
Comments
Comment #1
brendoncrawford commented