Can't submit forms in Safari, Edge or IE.
What's the issue?
Can't submit a form in Safari. I get the error "Failed to parse response JSON: SyntaxError: The string did not match the expected pattern." in the search console.
How do we reproduce the issue?
- Open Safari, go to this amp-website
- submit the contact form(s)
- Check the developer's console
- Reproduce this in Chrome or Firefox to see needed results
The same happens in Edge and IE.
You can view the form-handler code here.
What browsers are affected?
Safari version-12 (I'm testing on a MacBook Pro). Edge (latest, testing on a Windows laptop). IE (latest, testing on a Windows laptop).
Which AMP version is affected?
Using AMP-form version-0.1 and AMP-mustache version-0.2.
CC @dvoytenko
/to @aghassemi @cvializ anything you see?
I've fixed it — at least on Safari! I'll re-test on Edge and IE too and re-open if persists.
if ( ! isset( $_POST['conact_form'] ) ) {
Hi @rahulkhosla thanks for opening this issue, I'm not able to reproduce on other sites so it must have only been a problem in the pasted code.