• Like so many people, I’m getting the Argument 1 passed to Ctct\Components\Contacts\Contact::create() must be an array, null given error.

    So far I’ve traced it to parent::getRestClient()->post returning a null response in addContact() found on line 62 of vendor/constantcontact/constantcontact/src/Ctct/Services/ContactService.php.

    All 3 parameters going into the post have data so I know the submitted form data gets this far.

    I don’t know enough about the constant contact api to know if the Authorization: Bearer or api_key tokens are bad. I turned on all of the logging checkboxes but don’t see where the logfile would be. I’m guessing it doesn’t get written since the plugin crashes with the null exception.

    Brian

    https://wordpress.org/plugins/constant-contact-api/

Viewing 1 replies (of 1 total)
  • Thread Starter brianmurphy

    (@brianmurphy)

    After many var_dumps I FOUND THE ERROR!

    The form builder tool provides the country code as a text input box. The API expects a 2 character country code.

    Enter US instead of United States and the form works.

    The form builder needs to be fixed to be a select drop down instead of a free form text entry box.

Viewing 1 replies (of 1 total)
  • The topic ‘Argument 1 passed to Ctct\Components\Contacts\Contact::create() must be an array’ is closed to new replies.