Our site was targeted by a spambot recently so I made some updates to plugins and enabled heavier spam protection measures.
Even since updating I’ve had issues with the submission process of our contact form.
Checking the Dev Tools Console, it seems to be related to JSON and reCAPTCHA.
This is the error code we get:
Object { code: "invalid_json", message: "The response is not a valid JSON response." }
code: "invalid_json"
message: "The response is not a valid JSON response."
<prototype>: Object { … }
__defineGetter__: function __defineGetter__()
__defineSetter__: function __defineSetter__()
__lookupGetter__: function __lookupGetter__()
__lookupSetter__: function __lookupSetter__()
__proto__:
constructor: function Object()
hasOwnProperty: function hasOwnProperty()
isPrototypeOf: function isPrototypeOf()
propertyIsEnumerable: function propertyIsEnumerable()
toLocaleString: function toLocaleString()
toString: function toString()
valueOf: function valueOf()
<get __proto__()>: function __proto__()
<set __proto__()>: function __proto__()
index.js:1:7071
l https://stwusastg.wpengine.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=5.7.7:1
(Async: promise callback)
l https://stwusastg.wpengine.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=5.7.7:1
o https://stwusastg.wpengine.com/wp-content/plugins/contact-form-7/modules/recaptcha/index.js?ver=5.7.7:1
(Async: promise callback)
then https://www.gstatic.com/recaptcha/releases/khH7Ei3klcvfRI74FvDcfuOo/recaptcha__en.js:410
o https://stwusastg.wpengine.com/wp-content/plugins/contact-form-7/modules/recaptcha/index.js?ver=5.7.7:1
submit https://stwusastg.wpengine.com/wp-content/plugins/contact-form-7/modules/recaptcha/index.js?ver=5.7.7:1
m https://stwusastg.wpengine.com/wp-content/plugins/contact-form-7/includes/js/index.js?ver=5.7.7:1
Any thoughts?