amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Can't submit forms in Safari, Edge or IE.

Open rahulkhosla opened this issue 8 years ago • 4 comments

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?

  1. Open Safari, go to this amp-website
  2. submit the contact form(s)
  3. Check the developer's console
  4. 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.

rahulkhosla avatar Nov 04 '18 02:11 rahulkhosla

CC @dvoytenko

rahulkhosla avatar Nov 04 '18 02:11 rahulkhosla

/to @aghassemi @cvializ anything you see?

dvoytenko avatar Nov 04 '18 19:11 dvoytenko

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'] ) ) {

rahulkhosla avatar Nov 04 '18 22:11 rahulkhosla

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.

cvializ avatar Nov 05 '18 14:11 cvializ