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 expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: “The response was not a valid JSON object.” on form success
Status | Resolved |
Add-on / Version | Custom System Messages |
Severity | Critical |
EE Version | 17 |
Heiko
Oct 02, 2012Hi there,
I’ve read all the other tickets, but couldn’t find a solution.
I’m using CSM v2.4.2 on a Zoo Visitor registration form - with a valid return path - and the validation is working beautifully, except when the form submission succeeds.
In that case, I get this error: “The response was not a valid JSON object.”
My CSM settings are:
Enable ajax responses? - YES.
Bypass the message template entirely? - YES.
Redirect to the defined error template? - YES.
Accessibility. - NO CHANGE.
I’ve also tried to set json=“yes” on the ZV form, but then CSM is bypassed completely.
This is the form from my template: http://pastie.org/4895744
Can you please help?
BoldMinded (Brian)
Oct 02, 2012
Look at the Network tab in your console, what is the response content? e.g. https://skitch.com/litzinger/esk5t/boldminded
BoldMinded (Brian)
Oct 02, 2012
My guess is Zoo Visitor is immediately doing a redirect after the submission, which is not a valid JSON response, hence the error you’re getting. Try setting the message_on_success parameter to no, e.g.
Heiko
Oct 03, 2012
Thanks for your help!
I set the parameter to “no”, but the error prevails.
I’m not sure what to look for in the inspector, but I get a warning in the console:
The page at https://mysite.com/register ran insecure content from http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js.
Heiko
Oct 03, 2012
I just noticed that the form is submitted, although the redirect doesn’t take place. When I refresh the page directly after form submission, the data is entered correctly and the user logged in.
Heiko
Oct 03, 2012
OK, at least I figured out why the the warning occured. Unfortunately it wasn’t related to out problem here. 😛
Heiko
Oct 03, 2012
BTW, the issue doesn’t occur with ZV forms only. I just tested it on a native Safecracker form and it’s the same there.
BoldMinded (Brian)
Oct 03, 2012
Can you share the URL so I can see the forms in action? You can edit this ticket and save it to the details, then only I’ll see it.
Heiko
Oct 03, 2012
Man, I updated the ticket, but no changes have been saved. Happened more than once, while editing in general. :(
Heiko
Oct 03, 2012
Uppps, they WERE saved! 😉
I have to send you the URL in question plus .htaccess credentials. Shall I do so via email?
BoldMinded (Brian)
Oct 03, 2012
I see the credentials in the ticket, did you not see them when editing?
Heiko
Oct 03, 2012
No no, I was just confused… it happens! 😉
Heiko
Oct 03, 2012
So, any new insights? I’m waiting desperately.
Heiko
Oct 04, 2012
OK, never mind, I’ve just set up some redirects to custom templates, which is already awesome enough! 😉
Thank you.