The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

Constant Contact- Catchable fatal error

Highlighted
Frequent Visitor

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
Highlighted
Honored Contributor

Re: Constant Contact- Catchable fatal error

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

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured