You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the action url is from the same host, the $node->getAttribute( 'action' ) return a relative URL instead of full URL. I could not find why it happens yet, but the AMP_Form_Sanitizer doesn't add the server host to action-xhr and amp-form validation fails with the following error:
log.js:342 Uncaught (in promise) Error: form action-xhr must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: /produtos/barra-p-cortina-110x200cm-ck912/?amp&add-to-cart=2856&_wp_amp_action_xhr_converted=1
Apart of full URL to relative URL convertion, I believe that a user can have problems while trying to add a regular form with relative URLs. That's why I think it's important to sanitizer detect that and format the URL.
The text was updated successfully, but these errors were encountered:
@westonruter I did the PR fae8ab9 with the patch I'm using, but didn't do any further debug. It solves the problem when the original form have relative paths, but it doesn't handle the issue of $node->getAttribute( 'action' ) returning relative paths instead of full URLs when the host is the same.
When the action url is from the same host, the $node->getAttribute( 'action' ) return a relative URL instead of full URL. I could not find why it happens yet, but the
AMP_Form_Sanitizer
doesn't add the server host to action-xhr and amp-form validation fails with the following error:log.js:342 Uncaught (in promise) Error: form action-xhr must start with "https://" or "//" or be relative and served from either https or from localhost. Invalid value: /produtos/barra-p-cortina-110x200cm-ck912/?amp&add-to-cart=2856&_wp_amp_action_xhr_converted=1
Apart of full URL to relative URL convertion, I believe that a user can have problems while trying to add a regular form with relative URLs. That's why I think it's important to sanitizer detect that and format the URL.
The text was updated successfully, but these errors were encountered: