Title: Fatal Error When Activating Plugin
Last modified: December 5, 2016

---

# Fatal Error When Activating Plugin

 *  Resolved [Celeste](https://wordpress.org/support/users/celeste-9/)
 * (@celeste-9)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/)
 * Hello, when I try to activate your plugin I get the following error message:
 * Fatal error: Cannot redeclare class Ctct\SplClassLoader in /var/www/…/wp-content/
   plugins/constant-contact-forms/vendor/constantcontact/constantcontact/constantcontact/
   src/Ctct/SplClassLoader.php on line 23
 * I am switching from another plugin which is being deprecated (Constant Contact
   Widget). In another thread you mentioned that other Constant Contact plugins 
   should be deactivated before activating this one. I deactivated and deleted the
   other plugin, and am still getting the error.
 * Any ideas on how to fix this? The old plugin stops working tomorrow.
 * Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8516435)
 * Is “Fatal error: Cannot redeclare class Ctct\SplClassLoader in /var/www/…/wp-
   content/plugins/constant-contact-forms/vendor/constantcontact/constantcontact/
   constantcontact/src/Ctct/SplClassLoader.php on line 23” the full error it’s showing
   you? I’m curious if we’re missing part of the error in the “…” showing. Possible
   that it’s displaying the path to the other file.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8516437)
 * Also can you provide a link to the Constant Contact widget you’re previously 
   using?
 *  Thread Starter [Celeste](https://wordpress.org/support/users/celeste-9/)
 * (@celeste-9)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8517446)
 * Hi Michael, the “…” is my server root info. I’m testing this on a non-public 
   staging site so I left it out for security purposes. I don’t think it contains
   any useful info.
 * The plugin we have been using is Constant Contact Widget by MembershipWorks. 
   I tried to link to their page on wordpress.org, but it is no longer a valid link.
   This is the plugin website: [https://membershipworks.com/constant-contact-widget-a-free-simple-and-lightweight-plugin/](https://membershipworks.com/constant-contact-widget-a-free-simple-and-lightweight-plugin/)
 * If it is helpful to you, I can supply you with an admin login to my staging site.
 * Thanks.
 *  [MembershipWorks](https://wordpress.org/support/users/sourcefound/)
 * (@sourcefound)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8517491)
 * I am the author of the Constant Contact Widget referenced above, and FYI the 
   only class we define is “sf_widget_constantcontact”. All other functions are 
   also declared with the namespace prefix “sf_”. Regardless, the user in this case
   has de-activated and deleted the plugin, it would not be loaded by PHP and there
   is no way it can cause a conflict.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8517697)
 * Hi MembershipWorks, just trying to cover all bases here. One thing to keep in
   mind is that this library in question has its own namespace and whatnot. I’ve
   seen a number of cases where this class has come in conflict, and I’m trying 
   to figure out why. The users have said they’ve deactivated the previous plugin(
   s) but the conflict is still showing up somehow. Thanks for the information, 
   nonetheless.
 *  [MembershipWorks](https://wordpress.org/support/users/sourcefound/)
 * (@sourcefound)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8522110)
 * Hi Michael Beckwith! We use the namespace prefix “sf_” and the plugin has less
   than 200 lines of code, it is very straightforward. The subversion repository
   for Constant Contact Widget plugin can be found here:
 * [https://plugins.svn.wordpress.org/constant-contact-widget/](https://plugins.svn.wordpress.org/constant-contact-widget/)
 * It sounds like your namespace may have a conflict with a popular theme framework
   or another plugin.
 *  Thread Starter [Celeste](https://wordpress.org/support/users/celeste-9/)
 * (@celeste-9)
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8524575)
 * MembershipWorks, thanks for your input on this. You are correct, the issue is
   with another plugin. I tested each of my plugins with Constant Contact Forms,
   and the fatal error happens with the Total Donations plugin. This plugin gives
   our donors the option to sign up for our Constant Contact mailing list via a 
   checkbox when they make a payment. Here is the link to the plugin:
 * [https://codecanyon.net/item/total-donations-for-wordpress/9985487](https://codecanyon.net/item/total-donations-for-wordpress/9985487)
 * The Total Donations plugin is our sole source of collecting donations from our
   customers, so we have to leave it active. Any ideas on how to resolve the conflict?
 * Thanks again!
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8526787)
 * Chances are it’s also using [https://github.com/constantcontact/php-sdk](https://github.com/constantcontact/php-sdk)
   for its Constant Contact integration.
 * From the looks of the other thread I know you’re talking in, my attempt to do
   a class_exists() check in our plugin didn’t work, or something else cropped up
   afterwards with a similar issue.
 *  Plugin Contributor [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [9 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8526797)
 * I can safely rule out that the conflict isn’t coming from the widget.
 * Thanks for chiming in to help narrow stuff down MembershipWorks.
 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8598325)
 * Marking resolved as it’s a known issue and we’re looking into how to make the
   libraries play nice together.
 * Thank you for the patience thus far.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Fatal Error When Activating Plugin’ is closed to new replies.

 * ![](https://ps.w.org/constant-contact-forms/assets/icon-256x256.png?rev=2951825)
 * [Constant Contact Forms](https://wordpress.org/plugins/constant-contact-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/constant-contact-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/constant-contact-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/constant-contact-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/constant-contact-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/constant-contact-forms/reviews/)

 * 10 replies
 * 4 participants
 * Last reply from: [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-when-activating-plugin-31/#post-8598325)
 * Status: resolved