We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

Constant Contact- Catchable fatal error

CarlA831
Participant

Constant Contact- Catchable fatal error

I am trying to add newletter form for subscription using constant Contact Plugin.I have created a form in Form Designer.When i added the shortcode in the footer section of my website.I got the following error.

 

Catchable fatal error: Argument 1 passed to Ctct\Components\Contacts\ContactList::create() must be of the type array, null given, called in /home/x252016w/public_html/bostonmobile/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Services/ListService.php on line 89 and defined in/home/x252016w/public_html/bostonmobile/wp-content/plugins/constant-contact-api/vendor/constantcontact/constantcontact/src/Ctct/Components/Contacts/ContactList.phpon line 53

 

ListService.php  line no. 89 is: return ContactList::create(json_decode($response->body, true));

ContactList.phpon line 53 : 

public static function create(array $props)
{
$contact_list = new ContactList();
$contact_list->id = parent::getValue($props, "id");
$contact_list->name = parent::getValue($props, "name");
$contact_list->status = parent::getValue($props, "status");
$contact_list->contact_count = parent::getValue($props, "contact_count");
$contact_list->created_date = parent::getValue($props, "created_date");
$contact_list->modified_date = parent::getValue($props, "modified_date");
return $contact_list;
}

 

How to solve this error??Please reply as soon as possible.Thanks in advance

1 REPLY 1
Elijah_G
Member

Hello,

 

After doing a bit of research, it looks like the problem is that the form you're working with is not able to get details for a contact list when it loads into the page. There are a couple causes for this:

  1. The form is set up to use a Contact List that doesn't exist anymore.
  2. The plugin may be having trouble connecting to your Constant Contact account.

 

For the first possibility, I would suggest double-checking what lists are available in your Constant Contact account, and then double-checking your form to ensure that it's linked to a list that does exist. For the second possibility, I would suggest reconnecting your Constant Contact account on the admin page for the plugin.

 

Let me know if this helps!

 

Sincerely,

Elijah G.
API Support Engineer
Developer Portal

View API documentation, code samples, get your API key.

Visit Page