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)
Look at the Network tab in your console, what is the response content? e.g. https://skitch.com/litzinger/esk5t/boldminded
BoldMinded (Brian)
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
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
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
OK, at least I figured out why the the warning occured. Unfortunately it wasn’t related to out problem here. 😛
Heiko
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)
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
Man, I updated the ticket, but no changes have been saved. Happened more than once, while editing in general. :(
Heiko
Uppps, they WERE saved! 😉
I have to send you the URL in question plus .htaccess credentials. Shall I do so via email?
BoldMinded (Brian)
I see the credentials in the ticket, did you not see them when editing?
Heiko
No no, I was just confused… it happens! 😉
Heiko
So, any new insights? I’m waiting desperately.
Heiko
OK, never mind, I’ve just set up some redirects to custom templates, which is already awesome enough! 😉
Thank you.