Support » Plugin: MailChimp List Subscribe Form » Fatal error

  • Resolved marcAroma

    (@marcaroma)


    Can anyone help me how to fix this error in ‘MailChimp Setup’?

    I did not change anything within the PlugIn folder… However, the PlugIn seems to work on the front end…

    Thank You,
    Marc

    Fatal error: Uncaught Error: Cannot use object of type WP_Error as array in /wp-content/plugins/mailchimp/mailchimp.php:584 Stack trace: #0 /wp-content/plugins/mailchimp/views/setup_page.php(12): mailchimpSF_change_list_if_necessary() #1 /wp-content/plugins/mailchimp/mailchimp.php(706): require_once(‘/home/websitem/…’) #2 /wp-includes/class-wp-hook.php(286): mailchimpSF_setup_page(”) #3 /wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(”, Array) #4 /wp-includes/plugin.php(453): WP_Hook->do_action(Array) #5 /wp-admin/admin.php(224): do_action(‘settings_page_m…’) #6 /wp-admin/options-general.php(10): require_once(‘/home/websitem/…’) #7 { in /wp-content/plugins/mailchimp/mailchimp.php on line 584

    • This topic was modified 1 year, 9 months ago by marcAroma.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey there, i’ve found a solution for this problem.

    This happens because probably your API Key is not valid anymore, and the MailChimp API can’t connect to MailChimp services. So you need to configure a new API Key.

    The settings page frozen occurs because MailChimp plugin triggers an WP Error on line 584 of file mailchimp/mailchimp.php, trying to get the mail lists of MailChimp service.

    What you need to do is verify if $lists is an WP Error, then return null:

    $lists = $api->get('lists',100, array('fields' => 'lists.id,lists.name,lists.email_type_option'));
        if (is_wp_error( $lists ) ) {
            return;
        }

    Done that, everything should works fine

    Great! Thank you @flschaves!!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Fatal error’ is closed to new replies.