• Resolved vsantoro49

    (@vsantoro49)


    Constant Contact form is not sending contacts to the CC list. Last contact update was on June 8, 2023, when the plugin update was released. The website is using Elementor (free version). I get a message indicating a critical WordPress error. Here are the details:

    It may be helpful to include something like this in your post:
    
    - Resyncing did not resolve
    - Disconnected
    - attempted reconnect> Critical Error on your website. Please see your email for instructions Here is what was in the message you sent to me: When seeking help with this issue, you may be asked for some of the following information:
    WordPress version 6.3.1
    Active theme: Astra Child (version 1.0.0)
    Current plugin: Constant Contact Forms for WordPress (version 2.3.0)
    PHP version 8.1.23


    Error Details
    =============
    An error of type E_ERROR was caused in line 1496 of the file /home/medx/public_html/wp-content/plugins/constant-contact-forms/includes/class-api.php. Error message: Uncaught TypeError: array_keys(): Argument #1 ($array) must be of type array, null given in /home/medx/public_html/wp-content/plugins/constant-contact-forms/includes/class-api.php:1496
    Stack trace:
    #0 /home/medx/public_html/wp-content/plugins/constant-contact-forms/includes/class-api.php(1496): array_keys(NULL)
    #1 /home/medx/public_html/wp-content/plugins/constant-contact-forms/includes/class-api.php(851): ConstantContact_API->has_note(NULL)
    #2 /home/medx/public_html/wp-content/plugins/constant-contact-forms/includes/class-api.php(1607): ConstantContact_API->create_update_contact(Array, 'c.maguire@medx....', NULL, '1219')
    #3 /home/medx/public_html/wp-includes/class-wp-hook.php(310): ConstantContact_API->clear_missed_api_requests('')
    #4 /home/medx/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters('', Array)
    #5 /home/medx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #6 /home/medx/public_html/wp-content/plugins/constant-contact-forms/includes/class-api.php(1378): do_action('ctct_access_tok...')
    #7 /home/medx/public_html/wp-content/plugins/constant-contact-forms/includes/class-api.php(102): ConstantContact_API->acquire_access_token()
    #8 /home/medx/public_html/wp-includes/class-wp-hook.php(310): ConstantContact_API->cct_init('')
    #9 /home/medx/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)
    #10 /home/medx/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    #11 /home/medx/public_html/wp-settings.php(632): do_action('init')
    #12 /home/medx/public_html/wp-config.php(97): require_once('/home/medx/publ...')
    #13 /home/medx/public_html/wp-load.php(50): require_once('/home/medx/publ...')
    #14 /home/medx/public_html/wp-admin/admin.php(34): require_once('/home/medx/publ...')
    #15 /home/medx/public_html/wp-admin/edit.php(10): require_once('/home/medx/publ...')
    #16 {main}
    thrown

    The page I need help with: [log in to see the link]

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter vsantoro49

    (@vsantoro49)

    What file do I need to edit? Provide some direction (go here…do this) and I’ll do it. Thanks

    • This reply was modified 2 years, 7 months ago by vsantoro49.
    Plugin Author Constant Contact

    (@constantcontact)

    There should be a file named includes/class-api.php in the plugin folder, and at line 1495, this line of code:

    private function has_note( $submission_data ) {

    Right after that, starting on line 1496, we’re planning to add these 3 lines:

    if ( ! is_array( $submission_data ) ) {
    	return false;
    }

    This would be BEFORE this line:

    $keys = array_keys( $submission_data );

    This will have the code exit out before the fatal error can occur.

    By all means please make sure to make a backup first, just in case, but hopefully this change is straight forward enough that there shouldn’t be a huge amount of worry.

    I’m also going to start pushing internally to get the next release out the door soon, but this should help your specific case for the moment.

    Thread Starter vsantoro49

    (@vsantoro49)

    Okay, thanks, I’ll let you know when it’s done.

    Thread Starter vsantoro49

    (@vsantoro49)

    The edit was made. I’ll let you know if it works. Thanks.

    Plugin Author Constant Contact

    (@constantcontact)

    Sounds good.

    Plugin Author Constant Contact

    (@constantcontact)

    This change was also made in the 2.4.0 release. Because of that, I’m marking this thread as resolved

Viewing 6 replies - 16 through 21 (of 21 total)

The topic ‘Critical Error with Forms Plugin’ is closed to new replies.