Contact not added, giving 400 error
-
Constant Contact support tells me that the plugin is getting a 400 bad request error when trying to post, but is successful in the “get” request.
We have turned on debugging. We have disabled cron scheduling. Can you help me troubleshoot why my contacts are not added please?
The page I need help with: [log in to see the link]
-
Hi @agentjimmy
Is there any content in the error logs that are added once that setting is enabled? You will probably need to try to use the form again after enabling. I have also gone in and submitted to it to try and help populate some info.
Where do I find these error logs?
Any that got generated should be in the “Debug Logs” menu entry in our “Contact Form” menu in your admin area. It’s a submenu entry that only shows up if the setting is enabled.
Here is the text from the debug logs:
[2018-10-30 15:17:04] API.INFO: Contact set to be created ["Extra information",[{"form":"Sign up"}]] [] [2018-10-30 15:17:05] API.INFO: json.field.invalid: #/WP55T3S7XJS2: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/WP55T3S7XJS2: Property was found but is not permitted at this location.\"})"]] [] [2018-10-30 15:17:05] API.INFO: json.field.invalid: #/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location.\"})"]] [] [2018-10-30 15:22:10] API.INFO: Contact set to be created ["Extra information",[{"form":"Sign up"}]] [] [2018-10-30 15:22:10] API.INFO: json.field.invalid: #/WP55T3S7XJS2: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/WP55T3S7XJS2: Property was found but is not permitted at this location.\"})"]] [] [2018-10-30 15:22:10] API.INFO: json.field.invalid: #/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location.\"})"]] [] [2018-10-30 16:07:39] API.INFO: Contact set to be created ["Extra information",[{"form":"Sign up"}]] [] [2018-10-30 16:07:40] API.INFO: json.field.invalid: #/WP55T3S7XJS2: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/WP55T3S7XJS2: Property was found but is not permitted at this location.\"})"]] [] [2018-10-30 16:07:40] API.INFO: json.field.invalid: #/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location.\"})"]] [] [2018-10-31 15:38:08] API.INFO: Contact set to be created ["Extra information",[{"form":"Sign up"}]] [] [2018-10-31 15:38:09] API.INFO: json.field.invalid: #/WP55T3S7XJS2: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/WP55T3S7XJS2: Property was found but is not permitted at this location.\"})"]] [] [2018-10-31 15:38:09] API.INFO: json.field.invalid: #/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location.\"})"]] [] [2018-11-03 19:31:14] API.INFO: Contact set to be created ["Extra information",[{"form":"Sign up"}]] [] [2018-11-03 19:31:14] API.INFO: json.field.invalid: #/WP55T3S7XJS2: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/WP55T3S7XJS2: Property was found but is not permitted at this location.\"})"]] [] [2018-11-03 19:31:14] API.INFO: json.field.invalid: #/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location. ["Extra information",["[object] (stdClass: {\"error_key\":\"json.field.invalid\",\"error_message\":\"#/cf230227d37511f6f0b6f83e140b4184: Property was found but is not permitted at this location.\"})"]] []Do you have any other contact form plugins active or some sort of spam prevention plugin.
The error log content above is indicating that some fields that are getting dynamically appended to our form, are being submitted as part of the form processing, and because our Constant Contact API doesn’t recognize the fields, it’s outright rejecting the submission.
This has us viewing the source of the page that the form is on, and we’re seeing some javascript creating hidden inputs, which is why we are asking about other contact forms or spam plugins. Not the first time we’ve seen similar errors and if we can know what you’re using, we can see about possibly integrating some compatibility.
I have Gravity Forms and Huge IT forms installed, as well as woocommerce. The only form Constant Contact support could identify as being on the website is Gravity Forms, which is a Contact Us form right above the Constant Contact form on the Contact page. I will replace that form with the Huge IT form and see if it works, but I do need to also have a Contact Us form.
Anything that can help track down what’s adding the javascript will be a big help. Not sure we’re going to be able to permanently make our code skip that hidden field, especially if the key parts update/change periodically.
No it did not work. I had someone enter their information and it still did not register or generate the welcome email. I did delete the other form app thought to be causing concern.
Can you provide some updated logs since trying things out? I have some suspicions based on the previous logs, but want to confirm.
Thank you for the quick reply! No error log exists
-
This reply was modified 7 years, 6 months ago by
Bernie DiSantis.
FIrefox does not seem to have an autofill feature, but I submitted the forms using Chrome & Edge… both using the autofill features.
-
This reply was modified 7 years, 6 months ago by
Bernie DiSantis.
One more question. By chance, are you using WP-SpamShield on your site?
We are not using WP-SpamShield.
Nothing new like what we had from https://wordpress.org/support/topic/contact-not-added-giving-400-error/#post-10853235 ?
No… it only says No error log exists.
-
This reply was modified 7 years, 6 months ago by
The topic ‘Contact not added, giving 400 error’ is closed to new replies.