• Resolved dota3

    (@dota3)


    My website is https, wordpress 5.2.3, AMP Version 1.2.2, theme is Astra.

    I active the AMP plugin, select “Standard” Website Mode, check “Serve all templates as AMP regardless of what is being queried. ”

    When I post a comment or a a contact form7 form, it always shows that “Your submission failed. The server responded with (code ). Please contact the developer of this form processor to improve this message. Learn More”. (Yes, there is no exact error code)

    But in non-AMP website mode, everything is ok, I can post comment or form successfully.

    I don’t why, please help me, thank you.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    In looking at the Network Console in Chrome DevTools, I can see that a form submission is resulting in a 403 Forbidden response, apparently due to your web server configuration:

    <!doctype html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <meta http-equiv="x-ua-compatible" content="ie=edge">
      <title>403 Error</title>
      <meta name="viewport" content="width=device-width, initial-scale=1">
      <meta name="robots" content="noindex, nofollow">
      <style>
        @media screen and (max-width:500px) {
          body { font-size: .6em; } 
        }
      </style>
    </head>
    
    <body style="text-align: center;">
    
      <h1 style="font-family: Georgia, serif; color: #4a4a4a; margin-top: 4em; line-height: 1.5;">
        It appears you don't have<br>permission to access this&nbsp;page.
      </h1>
      
      <h2 style="  font-family: Verdana, sans-serif; color: #7d7d7d; font-weight: 300;">
        403 Error. Forbidden.
      </h2>
      
    </body>
    
    </html>

    Here’s an example curl command you can run to reproduce it:

    curl -i 'https://ulinkpack.com/1930-2/?_wp_amp_action_xhr_converted=1&__amp_source_origin=https%3A%2F%2Fulinkpack.com' -H 'sec-fetch-mode: cors' -H 'origin: https://ulinkpack.com' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-US,en;q=0.9,es-US;q=0.8,es;q=0.7,la;q=0.6' -H 'pragma: no-cache' -H 'amp-same-origin: true' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36' -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundaryAaKTkSzi7RSQ8Vwh' -H 'accept: application/json' -H 'cache-control: no-cache' -H 'authority: ulinkpack.com' -H 'referer: https://ulinkpack.com/1930-2/' -H 'sec-fetch-site: same-origin' --data-binary $'------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="_wpcf7"\r\n\r\n736\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="_wpcf7_version"\r\n\r\n5.1.4\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="_wpcf7_locale"\r\n\r\nen_US\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="_wpcf7_unit_tag"\r\n\r\nwpcf7-f736-p1930-o1\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="_wpcf7_container_post"\r\n\r\n1930\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="your-name"\r\n\r\nJohn Smith\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="your-email"\r\n\r\[email protected]\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="text-944"\r\n\r\n\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh\r\nContent-Disposition: form-data; name="your-message"\r\n\r\nTest\r\n------WebKitFormBoundaryAaKTkSzi7RSQ8Vwh--\r\n' --compressed

    Plugin Author Weston Ruter

    (@westonruter)

    The issue seems to be that your web server is configured for fail requests that contain the __amp_source_origin query parameter. For example, try going to:

    https://ulinkpack.com/1930-2/?__amp_source_origin=https%3A%2F%2Fulinkpack.com

    So I think this is a web server configuration problem, and not something to do with the AMP plugin.

    Thread Starter dota3

    (@dota3)

    Thank you very much for your prompt and professional reply.
    I bought bluehost web hosting, but unfortunately there is no place I can configure I think.

    Plugin Author Weston Ruter

    (@westonruter)

    I suggest opening a support request to ask about it. It seems like a bug.

    Thread Starter dota3

    (@dota3)

    I ask them but they say it is not a bug, it is for security reason.

    Plugin Author Weston Ruter

    (@westonruter)

    What security reason?

    Thread Starter dota3

    (@dota3)

    Rejected because a high level security rule of ModSecurity was triggered, and the whitelist could not be added for me.

    • This reply was modified 5 years, 5 months ago by dota3.
    Plugin Author Weston Ruter

    (@westonruter)

    What is this high security rule? Such a query parameter would not be a security risk.

    Thread Starter dota3

    (@dota3)

    They give me this link, a screenshot of error code: https://prntscr.com/p43ada.

    Plugin Author Weston Ruter

    (@westonruter)

    I see. So it’s not the __amp_source_origin query param at all. It’s the value of the query param that’s the problem.

    If I use another query param (e.g. something) then it is the same problem: https://ulinkpack.com/1930-2/?something=https%3A%2F%2Fulinkpack.com

    Nevertheless, they do have exceptions for this. For example, the redirect_to query param is allowed: https://ulinkpack.com/1930-2/?redirect_to=https%3A%2F%2Fulinkpack.com

    So the only advice I have is for you to request __amp_source_origin get the same exception as redirect_to.

    Hi, I’m also facing the same issue. Need solutions for this https://globemoving.net/blog/.

    Your submission failed. The server responded with (code ). Please contact the developer of this form processor to improve this message. Learn More

    Weston, can you please help?

    Thread Starter dota3

    (@dota3)

    Hi, Weston, very very thank you for your good advice!
    Now bluehost solve thie problem for me, everything semms ok now. I love AMP, I love you hahaha.

    Plugin Author Weston Ruter

    (@westonruter)

    @gmsc Please open a new topic and provide details about your site, like the plugins and host.

    @dota3 Glad that resolved it! Feel free to leave the plugin a review ??

    Thread Starter dota3

    (@dota3)

    OK,5 stars praised!

    The SAME PROBLEM HAPPENS TO ME TOO, I COULDN’T SOLVE IT.
    THEY NEED YOU TO BUY A DEDICATED SERVER IN HOSTGATOR IN ORDER TO INSTALL THE ModSecurity FEATURE FOR YOU.
    CONTACT FORM 7, WPFORM, JETPACK FORM. NONE OF THOSE WORKS UNDER FULL AMP.
    Thinking about abandoning the forms, or hard code an AMP site from scratch.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Your submission failed. The server responded with (code ).’ is closed to new replies.