Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Fatal error: Cannot redeclare class MCAPI in sites/all/modules/mailchimp/MCAPI.class.php on line 2.
I got this error at admin/reports/status/run-cron on cron page.
Comments
Comment #1
JordiTR CreditAttribution: JordiTR commentedI'm also having this message on the same circumtances and I can't execute cron except if I desactivate the module. Any idea?
Comment #2
JordiTR CreditAttribution: JordiTR commentedFinally I've discovered that the mistake was having Mailchimp module and EMF (Email Marketing Framework) module active at the same time. That was the configuration of a customer which I respected because I had no previous experience with those modules. But the point is that both module include the mentioned MCAPI.class.php, and both are different versions (despite announcing to be the same version but with different number of lines...).
All in all was so easy to solve as discovering that the customer prefered the Mailchimp module, and once EMF was unistalled the problem stopped. The point is that you should select to use one or the other. Now it was obvious, MCAPI.class.php was loaded twice and with different code, at some point the system had to complain!! :-)
Well, at least this has been my experience, hope it help others :-)
Thanks a lot for the Mailchimp module!
Comment #3
YesCT CreditAttribution: YesCT commentedlooks like solution was posted in #2.
If that does not solve this, please open another issue.