Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from, be sure to visit to add the license to your account here on

Ticket: AJAX Error on form submissions I get 302 Moved Temporarily

Status Resolved
Add-on / Version Custom System Messages
Severity Critical
EE Version

Jubair Saidi

Apr 25, 2012

test for your self (use firebug):

on error it works fine.  but on success it gives the following error:
AJAX Error
The response was not a valid JSON object.

the email does get sent though and all works as it should except for the redirect.

should be noted that this is happening for all my forms.

also I just tried to upload images but it’s not letting me.  let me know an email address and I can send you screenshots.


Jubair Saidi

Apr 26, 2012

ok so I think I found the bug.

it’s associated with the setting:
“Bypass the message template entirely on successful actions?”

basically if this is set to no, then on successful submit of the form it displays the thank you in the response container space and then forwards on to the final destination.  however if it’s set to Yes, then the above error is what happens.  basically what it looks like is happening is that on success it’s returning the actual return page while it’s expecting a json object so the error is then thrown.


BoldMinded (Brian)

Apr 26, 2012

Ah, I see. Go to ext.system_messages.php line 211 or so and you will see a conditional. Add the last line to it so it looks like this:

            isset($settings['bypass_success']) AND $settings['bypass_success'] == 'y' AND 
            isset($data['redirect']) AND $data['redirect'] != '' AND
            $data['redirect'] != $data['referrer'] 
            AND ! $this->EE->input->is_ajax_request()

See if that works.


Brian Litzinger

Apr 26, 2012

I added this fix to 2.4.1 which I’ll push soon.

Login to reply