• Resolved Simon

    (@simonmaddox)


    I’m sure it’s a conflict with another plugin, but is there any way to change the class name in this plugin to avoid conflicts?

    Here’s the debug error I get at page load:

    Fatal error: Cannot declare class Carbon\Carbon, because the name is already in use in /xxx/xxxx/xxxxx/xxxxxxx/wp-content/plugins/ics-calendar/vendors/ics-parser/vendor/nesbot/carbon/src/Carbon/Carbon.php on line 63

    • This topic was modified 5 years, 8 months ago by Simon.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author room34

    (@room34)

    That’s a third party library so I can’t change the name, but I’m guessing the other plugin is also loading the same library. I could add a conditional to my plugin to check if the library is already loaded before it tries to load.

    That won’t 100% work though because if the other plugin is loading the library after mine is, the conditional would need to be added to that plugin instead.

    Thread Starter Simon

    (@simonmaddox)

    Thanks for the quick response. Is that something I can try as a pre-release?

    Thread Starter Simon

    (@simonmaddox)

    Grepping in /plugins showed the only other plugin using Carbon was MailPoet(v3) – which was network disabled on the multi-site I am using. Deleting it did cure the problem though – strange how a disabled plugin has this effect.

    Plugin Author room34

    (@room34)

    Thanks, I’m glad you were able to resolve the issue.

    Just to clarify one point… on Multisite, if a plugin is not “network enabled” it doesn’t actually mean that it’s deactivated on any particular site. “Network enable” is the way to force a plugin to be turned ON on ALL of the sites. But plugins that are not network enabled can still be enabled on individual sites.

    I’m guessing that was the case here… but I thought Multisite only let you delete plugins if they were deactivated on all sites in the network. Did you delete it through the WordPress Multisite admin interface, or did you delete the plugin’s folder directly on the server? You might just want to verify that you didn’t remove important functionality for any of the sites on the network.

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