• Resolved mousaabumazin

    (@mousaabumazin)


    I am using Standard mode on my website,

    Users couldn’t submit the Mailchimp plugin newsletter in my posts
    Whenever I checked my POSTS pages with the developer tool I got this Error
    [amp-form] Form submission failed: Error: HTTP error 406???

    is there a way to fix it, other than redirecting users to a non-amp page?
    I’ve gone through CROS documentation and handling forms but I really did not know how to do that.

    OR do you guys recommend any other newsletter tool?

    Thanks in Advance

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

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

    (@westonruter)

    The form submission is going to another domain, yes?

    I believe this is the same issue as reported here: https://github.com/ampproject/amp-wp/issues/4191

    We have a fix in the works that will solve that problem by implementing a proxy endpoint: https://github.com/ampproject/amp-wp/pull/4212

    Thread Starter mousaabumazin

    (@mousaabumazin)

    First thanks for the fast response,
    I believe I’m using the same domain, after subscribning *redirecting
    and it appears on every post I have, like this:

    VM8316:1 POST https://majana.blog/wp-json/mc4wp/v1/form?_gl=1*bq6z7r*_ga*NjMzNjcxOTM0LjE1OTg4MDAwNTY.&__amp_source_origin=https%3A%2F%2Fmajana.blog 406
    (anonymous) @ VM8316:1
    (anonymous) @ v0.js:139
    Promise.then (async)
    f.Lg @ v0.js:139
    mg @ v0.js:140
    f.fetch @ v0.js:141
    push.f.k.ba @ amp-form-0.1.js:82
    Gc @ amp-form-0.1.js:75
    (anonymous) @ amp-form-0.1.js:74
    Promise.then (async)
    (anonymous) @ amp-form-0.1.js:74
    Promise.then (async)
    uc @ amp-form-0.1.js:74
    (anonymous) @ amp-form-0.1.js:67
    Promise.then (async)
    push.f.k.Da @ amp-form-0.1.js:67
    Hf @ v0.js:124
    f.execute @ v0.js:118
    Bh @ v0.js:188
    v0.js:23 [amp-form] Form submission failed: Error: HTTP error 406???
        at gb (https://cdn.ampproject.org/v0.js:30:169)
        at ab.f.createError (https://cdn.ampproject.org/v0.js:25:149)
        at https://cdn.ampproject.org/v0.js:139:399
        at new Promise (<anonymous>)
        at kg (https://cdn.ampproject.org/v0.js:139:334)
        at https://cdn.ampproject.org/v0.js:141:276
    eb @ v0.js:23
    f.Ja @ v0.js:24
    f.error @ v0.js:24
    Ic @ amp-form-0.1.js:84
    (anonymous) @ amp-form-0.1.js:84
    Promise.then (async)
    Nc @ amp-form-0.1.js:84
    (anonymous) @ amp-form-0.1.js:75
    Promise.then (async)
    Gc @ amp-form-0.1.js:75
    (anonymous) @ amp-form-0.1.js:74
    Promise.then (async)
    (anonymous) @ amp-form-0.1.js:74
    Promise.then (async)
    uc @ amp-form-0.1.js:74
    (anonymous) @ amp-form-0.1.js:67
    Promise.then (async)
    push.f.k.Da @ amp-form-0.1.js:67
    Hf @ v0.js:124
    f.execute @ v0.js:118
    Bh @ v0.js:188

    I have Also check implement form submission proxy, but I didnt know where to put it exactly on my “class-amp-form-sanitizer.php”

    and for the response header method, I couldnt find where this file is, is it in .htaccess file? or we-include? ? im sorry, but it is a little bit confusing to me and i cant find steps to follow

    Plugin Author Weston Ruter

    (@westonruter)

    OK, thanks for that additional info.

    In that case, I believe what you’re actually encountering is an issue with ModSecurity not being configured properly. In particular, your server is rejecting requests that have an __amp_source_origin query parameter present. Please review this documentation for more information: https://amp-wp.org/documentation/playbooks/handling-form-submissions/#dealing-with-modsecurity-failures

    You’ll probably have to contact your host to get that exception put in place. We’ve had reports of this happening at Bluehost and the fix is simply to contact support to add that query parameter to the allowlist.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mailchimp form in AMP pages’ is closed to new replies.