amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-form issue in latest release

Open leonahliang90 opened this issue 7 years ago • 15 comments

What's the issue?

Based on the PR, it blocks the GET request of action https://github.com/ampproject/amphtml/pull/20362

How do we reproduce the issue?

Please visit any of our ShopCart / Detail page and Click on "Buy Now" Button, the button is not responding as all the GET requests are blocked.

What browsers are affected?

All browsers

Which AMP version is affected?

we are seeing this version 1901242049580 on Production but when we are checking it from release section, this version is categorized as pre-release.

image

leonahliang90 avatar Jan 30 '19 03:01 leonahliang90

According to release tracking, this version 1901242049580 was pushed to production at 4:14 PM, Jan 29, 2019 UTC-5.

Hanrui avatar Jan 30 '19 03:01 Hanrui

Rolling back the release until this issue is resolved and will roll forward again. Apologies.

aghassemi avatar Jan 30 '19 03:01 aghassemi

I can repro on 011901242049580 but not on 011901241837330.

dreamofabear avatar Jan 30 '19 03:01 dreamofabear

@gmajoulet @torch2424 for now release was rolled back, let's fix, test and patch this and then roll forward again.

aghassemi avatar Jan 30 '19 03:01 aghassemi

sorry @Enriqe instead of @gmajoulet as the on-duty.

aghassemi avatar Jan 30 '19 03:01 aghassemi

(Canary would need to be patched or recut as well)

aghassemi avatar Jan 30 '19 03:01 aghassemi

Sounds good, I will patch the fix for this as well as #20593 in the new release. Then I will roll forward.

Enriqe avatar Jan 30 '19 18:01 Enriqe

@leonalicious

So the fix for this is now in PROD if I am not mistaken. 😄

However, I still need to implement the original PR (this time not breaking everything 😞). So I wanted to ask, how were you using amp-form? Looking at the site currently, seems like you were using a button and amp-bind to manually call submit on the form. For example: on:tap="... , form.submit".

Was the implementation that broke? Thanks!

torch2424 avatar Feb 02 '19 02:02 torch2424

@torch2424 Sorry for the late reply, I was away for the past few days.

We have been using the GET method to do the navigation, so, when the user clicks on form submission, we will submit all the amp-state as query params to be directed into another page.

leonahliang90 avatar Feb 11 '19 06:02 leonahliang90

@leonalicious Thank you for the response!

If you have the chance (and are familiar with the AMP dev channel), could you test the latest canary with your checkout flow? We've merged in: https://github.com/ampproject/amphtml/pull/20667 And want to make sure the new fix won't break your pages. I've gone ahead and manually tested this myself, but some testing on your end would be great. 👍

Thanks! 😄

torch2424 avatar Feb 11 '19 19:02 torch2424

Sorry for the delay, thank you @torch2424, both version 1902072121410 & 1902081532110 seems are working fine

leonahliang90 avatar Feb 13 '19 15:02 leonahliang90

@leonalicious

Thank you very very very much! 😄 Glad to hear it is working on you end as well.

torch2424 avatar Feb 13 '19 21:02 torch2424

thank you for the effort to make this possible. Btw, I am thinking, right now we are only able GET METHOD to do the page navigation, if we are planning to use POST METHOD, I presume the only way would be using the AMP-Redirect-To as Response Header, am I understanding it correctly?

leonahliang90 avatar Feb 14 '19 01:02 leonahliang90

@leonalicious For that, I'll ask for @cvializ help, as they are more familiar with AMP form than I am 😄

torch2424 avatar Feb 14 '19 23:02 torch2424

You are correct, the AMP-Redirect-To header is the only way to navigate the page after a <form method="POST" ...> successfully submits.

cvializ avatar Feb 15 '19 14:02 cvializ