amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

AMP form issue

Open izebaKK opened this issue 8 years ago • 4 comments

What's the issue?

In last few hours AMP form doesn't send form variables within request.

How do we reproduce the issue?

In second form, for example, if you fill data and press "Subscribe", entered data will not be sent to server and always same message will be shown: "Success! Thanks for trying the amp-form demo! Try to insert the word "error" as a name input in the form to see how amp-form handles errors.". Without {{name}} (in message) parameter, because this parameter was not sent to server. Same message is shown if you enter "error".

What browsers are affected?

I tried Safari, Firefox and Chrome- all same.

Which AMP version is affected?

amp-form-0.1.js

izebaKK avatar Dec 06 '17 18:12 izebaKK

I confirm that AMP POST forms using XHR are not working.

Example: Try to rate here: https://www.teksteshqip.com/dhurata-dora

I haven't made any changes.

plarentnasto avatar Dec 06 '17 18:12 plarentnasto

Might be due to this https://github.com/ampproject/amphtml/pull/12084 which just made it to prod

aghassemi avatar Dec 06 '17 19:12 aghassemi

Thanks for reporting and sorry for the breakage. We are rolling back the release from last night (going back to version 1510956201635) until this is fixed.

aghassemi avatar Dec 06 '17 19:12 aghassemi

The problem is instanceof FormDataWrapper doesn't work as expected.

https://github.com/ampproject/amphtml/blob/8bf675697b15d9dcd7b3805a2f5053a06ac4fe8e/src/service/xhr-impl.js#L153

One simple fix is to check existence of getFormData function instead.

dreamofabear avatar Dec 06 '17 19:12 dreamofabear