Failed to Comment via wordpress default form
-
I tried submitting a test comment and I saw the same thing. The serve is responding with a
406 Not Acceptableerror. Looking at the response body in the network console shows the message:An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.
This issue has come up before. The issue is Mod_Security is misconfigured to block requests that contain the
__amp_source_originquery parameter.You can see the same if you try adding it to an AMP page directly: https://digitallylearn.com/indias-first-pressurized-heavy-water-reactor-upsc-ias/?__amp_source_origin=https%3A%2F%2Fdigitallylearn.com
You can see that the issue was resolved previously by contacting Bluehost support and asking them to add
__amp_source_originto the list of allowed query parameters. See https://ww.wp.xz.cn/support/topic/your-submission-failed-the-server-responded-with-code/#post-11924818I’ve added this information to the documentation page: https://amp-wp.org/documentation/playbooks/handling-form-submissions/#dealing-with-modsecurity-failures
Okay thanks!!
I will contact and try to rectify this issue.I have talked and they whitelisted the mod rules…..for my domain……But, now I am not getting an error message while posting a comment, But now it’s nothing happening while posting a comment (not able to post a comment successfully). Screen freeze on – Submitting…( I have tried to comment from different ip address or devices)
Is it a known issue ?
In looking at the browser’s network console, I can see that the response is returning with the error message: “Blocked as suspected bot.” See screenshot below.
In doing a search through GitHub, it appears this is being caused by the MOJO Marketplace (
mojo-marketplace-wp-plugin).It appears that plugin is requiring JavaScript to be active in the browser to identify non-bots. This is not a reliable signal anymore. Akismet and Antispam Bee have both opted to not output JavaScript on AMP pages (see PR), and MOJO Marketplace needs to not only do this but also not fail submissions when JS was not running on the client.
One possible workaround would be to trick the plugin into thinking the that the hidden JS field was provided. The following code placed in a custom plugin should do the trick:
function fake_mm_spam_process_hidden_field( $data ) { // Forcibly set the js-spam-prevention post data to prevent mm_spam_process_hidden_field() later from failing. $_POST['js-spam-prevention'] = md5( $_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR'] ); return $data; } add_filter( 'preprocess_comment', 'fake_mm_spam_process_hidden_field', 5 ); add_filter( 'registration_errors', 'fake_mm_spam_process_hidden_field', 5 );But I recommend reaching out to the plugin author to fix this issue. It’s important not only for AMP pages but also for any user who has JavaScript turned off.
—-
Screenshot of failure:

-
This reply was modified 5 years, 9 months ago by
Weston Ruter.
@shikher231 Glad your issue was resolved. We would appreciate a plugin review.
Sure!!
-
This reply was modified 5 years, 9 months ago by
The topic ‘Failed to Comment via wordpress default form’ is closed to new replies.
(@shikher231)
5 years, 9 months ago
Your submission failed. The server responded with (code ). Please contact the developer of this form processor to improve this message.
https://amp-wp.org/?p=5463 (learn more – Takes me to this page…i did not understand what to do with that information.
Hosting provider – Bluehost
Amp – Standard mode on
The page I need help with: [log in to see the link]