WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: MailChimp Widget] Fatal error when activating mailchimp widget

[Resolved] [Plugin: MailChimp Widget] Fatal error when activating mailchimp widget

  • I get this error when I try to activate the plug-in.

    Plugin could not be activated because it triggered a fatal error.

    Fatal error: Class ‘NS_MC_Plugin’ not found in …/html/wp-content/plugins/mailchimp-widget/mailchimp_widget.php on line 52

    I have the latest version and I’ve tried it on multiple installs.

Viewing 15 replies - 1 through 15 (of 27 total)
  • Plugin Author jameslafferty
    Member

    @jameslafferty

    Hi cjscrofani… could you let me know the version of php you’re using? The plugin uses spl_autoload to pull in the correct classes… If this is a big issue for lots of folks, I’d be happy to load the classes differently, or to provide an alternative.

    James,

    I’m using PHP 5. Thanks for your willingness to help!

    Plugin Author jameslafferty
    Member

    @jameslafferty

    Hi cjscrofani,

    Had tested this on my Mac and Debian machines, but came across a change that might help. I’ve changed the filenames in the plugin, which may alleviate the issue. This isn’t enough of a change to warrant a new version (I don’t think), but maybe it’ll help? To implement, re-download and install the plugin, or install again from the admin panel in WP.

    Btw, if you’re using PHP earlier than 5.1.2, this likely won’t work, as that’s when spl_autoload was added. Like I said, if there’s enough demand, I’ll change the plugin to be more compatible with earlier versions of PHP, but hopefully that won’t be necessary (I really like autoload 😉 ).

    If you’re still having trouble with it, let me know!

    Plugin Author jameslafferty
    Member

    @jameslafferty

    Just checked in an upgrade to a new version 0.1.2. When that works its way through, it should fix your issue. Please let me know if you continue to have trouble, or, if the issue is fixed, let me know that, too! 🙂

    Plugin Author jameslafferty
    Member

    @jameslafferty

    My mistake on the version number. It should be 0.1.1.

    Plugin Author jameslafferty
    Member

    @jameslafferty

    I’m marking this resolved, as I think the issue has now been addressed. Please let me know if anyone else runs into the same issue with the plugin.

    Thank you!

    🙂

    James

    Yes, it’s working now. Thanks for your help!

    Just used the Admin install option and when I tried to activate got the following:

    Plugin could not be activated because it triggered a fatal error.

    Parse error: syntax error, unexpected ‘{‘ in …/wp-content/plugins/mailchimp-widget/mailchimp-widget.php on line 40

    I’ve looked through the code but not being that up to speed with PHP whatever changes I tried to make just triggered further errors. Do you have any suggestions?

    Thanks!

    Plugin Author jameslafferty
    Member

    @jameslafferty

    Hi alex_o,

    Could you tell me which version of PHP you’re using and what your server configuration is? It’ll be helpful in debugging. 🙂

    Cheers,

    James

    Plugin Author jameslafferty
    Member

    @jameslafferty

    As a side note, on that line in the code, there’s a try {} catch (Exception $e) {} block. If you’re not using PHP 5 or later, that won’t work and will cause an error.

    *looks guilty*

    Thanks James. Just switched everything over to PHP 5 – I didn’t realise you had to do that by domain with Mediatemple.

    Just tried everything out and it works brilliantly. Thank you for the speedy support and your work with the plug-in!

    Happy holidays!

    Alex

    Plugin Author jameslafferty
    Member

    @jameslafferty

    My pleasure! I’m glad I was able to help out and enjoy the plugin. (Parenthetically, I’ve scratched my head for ridiculously long amounts of time on exactly that issue with MediaTemple as well. Don’t know why they don’t switch the defaults to go the other way.) Happy holidays to you as well!

    baronetto
    Member

    @baronetto

    Hello,
    I’m still getting the Fatal error: Class ‘NS_MC_Plugin error with PHP 5.2 and WP 3.0.4.
    To be more specific, I can install, activate the plugin and the site works fine for a while but after a few minutes the error occurs.
    Any suggestions?

    Plugin Author jameslafferty
    Member

    @jameslafferty

    Hi baronetto,

    Just to clarify, which version of the plugin are you using?

    J.

    baronetto
    Member

    @baronetto

    Hello,
    I’m using version 0.5.2

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘[Resolved] [Plugin: MailChimp Widget] Fatal error when activating mailchimp widget’ is closed to new replies.