Fatal error: Cannot redeclare class MCAPI

More
18 Oct 2010 12:54 #322 by marcoo
We installed joomailer. When a user logs in, he gets following error:
Code:
Fatal error: Cannot redeclare class MCAPI in /home/admin/domains/sitename.com/public_html/dirname/modules/mod_mailchimp2/MCAPI.class.php on line 3
we have mod_mailchimp2 module also running. See more here
eepurl.com/Aw-

Please Log in or Create an account to join the conversation.

More
18 Oct 2010 16:03 #326 by chris
There is a conflict with another module you have installed as the MCAPI file is being included more than once.

Most likely you will have to edit that mod_mailchimp2 module so that the point where it includes this file looks something like this:
Code:
if(!class_exists('MCAPI')) { require_once(JPATH_SITE.'/modules/mod_mailchimp2/MCAPI.class.php'); }

Please Log in or Create an account to join the conversation.

More
18 Oct 2010 16:18 #328 by marcoo
indeed: line 70 of file send_to_mc.php

find
Code:
require_once('MCAPI.class.php');
replace with
Code:
if(!class_exists('MCAPI')) { require_once(JPATH_SITE.'/modules/mod_mailchimp2/MCAPI.class.php'); }





and also mod_mailchimp2.php line 107
Code:
require_once('MCAPI.class.php');
replace with
Code:
if(!class_exists('MCAPI')) { require_once(JPATH_SITE.'/modules/mod_mailchimp2/MCAPI.class.php'); }

Please Log in or Create an account to join the conversation.