• Resolved Celeste

    (@celeste-9)


    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

    (@tw2113)

    The BenchPresser

    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

    (@tw2113)

    The BenchPresser

    Also can you provide a link to the Constant Contact widget you’re previously using?

    Thread Starter Celeste

    (@celeste-9)

    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 www.ads-software.com, 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/

    If it is helpful to you, I can supply you with an admin login to my staging site.

    Thanks.

    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

    (@tw2113)

    The BenchPresser

    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.

    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.www.ads-software.com/constant-contact-widget/

    It sounds like your namespace may have a conflict with a popular theme framework or another plugin.

    Thread Starter Celeste

    (@celeste-9)

    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

    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

    (@tw2113)

    The BenchPresser

    Chances are it’s also using 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

    (@tw2113)

    The BenchPresser

    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

    (@constantcontact)

    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.