WordPress.org

Ready to get started?Download WordPress

Forums

MailChimp Widget
[resolved] Fatal error when activating mailchimp widget (28 posts)

  1. cjscrofani
    Member
    Posted 3 years ago #

    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.

  2. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  3. cjscrofani
    Member
    Posted 3 years ago #

    James,

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

  4. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    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!

  5. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    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! :)

  6. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

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

  7. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    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

  8. cjscrofani
    Member
    Posted 3 years ago #

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

  9. alex_o
    Member
    Posted 3 years ago #

    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!

  10. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    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

  11. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    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.

  12. alex_o
    Member
    Posted 3 years ago #

    *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

  13. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    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!

  14. baronetto
    Member
    Posted 3 years ago #

    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?

  15. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Hi baronetto,

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

    J.

  16. baronetto
    Member
    Posted 3 years ago #

    Hello,
    I'm using version 0.5.2

  17. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Hmmm... could you give me the url of the site where you're using it? The error is an indication that there's an issue with the spl_autoload function (it's not finding the class file). This could be because of interference from the theme or another plugin. If I can look at the url where it's occurring, I might be able to make a further guess.

    J.

  18. baronetto
    Member
    Posted 3 years ago #

    the url is http://www.hagitegas.gr

    the plugins I've installed and activated are:
    Akismet (2.5.1)
    Collapsing Archives (1.3.2)
    Contact Form 7 (2.4.3)
    Disqus Comment System (2.61)
    Google Analytics Dashboard (1.0.6)
    Quick Cache (2.2.7)
    Really Simple CAPTCHA (1.2)
    Simple Twitter Connect - Base (0.14)
    STC - Publish, STC - Tweet Button, STC - TweetMeme Button, STC - Twitter Dashboard (0.14)

    thank you for you time and effort :-)

  19. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    It's quite late here, so I'm going to work on this tomorrow. The procedure I'm going to follow is this:

    1. Do a clean install of WP.
    2. Install and activate the MailChimp Widget.
    3. Install and activate each of the other plugins in succession to see whether I'm able to break the MailChimp Widget.
    4. If I do find one, look at its code for possible conflicts.

    A bit too late to do it tonight, but if you want to take a stab and can isolate the plugin conflicting with the Mailchimp WIdget, it'll help me diagnose it faster tomorrow. :)

    Thanks for letting me know about this!

    J.

  20. baronetto
    Member
    Posted 3 years ago #

    OK, I'll see if I can find any conflicting plugins myself and I'll send you any related info.
    Let me know if you find any solution.
    Thank you very much :-)

  21. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    I've gone through the process of trying to reproduce the issue on a testing site, and haven't been able to. If you switch back to the default theme, do you still get the error?

    J.

  22. baronetto
    Member
    Posted 3 years ago #

    Yeap, it happens with default theme as well. (The current theme is internally based on the default anyway.)
    When this error occurs, I can't even access the admin panel.

  23. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Please email me directly (using my address from the plugin), and I'll try to help you figure it out (don't want to expose an private info on the forum... I'll post the resolution after we get it sorted out).

    J.

  24. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    For now, I've provided baronetto with a patch to address the issue on his particular server. In the current version, the use of the autoloader isn't essential (it was replaced with require_once calls to include the class libraries in the patch for baronetto), but it is likely to become useful as the plugin gets more complex in future versions.

    If anyone runs into the issue, they should get in touch with me directly (using the email provided with the plugin), and I'll be happy to provide the patch. Note that this does not seem to be an issue in most server setups. I'm asking that anyone running into the problem contact me directly for the patch so I can assess the extent of the problem.

    If I find anything further about what precisely in baronetto's setup is causing him to have this problem, I'll update this thread. I have not been able to reproduce it yet in testing.

  25. ozgroup
    Member
    Posted 3 years ago #

    i have installed http://wordpress.org/extend/plugins/mailchimp-widget/ and our comnpany webist ecrashed!!!

    we are suddenly getting error as follows:

    Fatal error: Class 'NS_Widget_MailChimp' not found in /home/content/e/r/r/errolozsite/html/ozgroup/wp-includes/widgets.php on line 324

    our site: http://www.OzGroup.com

    what should we do?

    i have called MailChimp company but they doen tgive a shit!
    they are blaming you!!!

  26. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Hi ozgroup,

    1. To eliminate the short term panic, simply delete the mailchimp-widget folder from /wp-content/plugins/ using your FTP client.

    2. Please watch your language on the forum.

    3. This issue is most likely due to either an older version of PHP being used on your host or a conflict with another plugin. If you'd like, you can contact me at jamesatnearlysensicaldotcom, and I'll be more than happy to try to help you get it working.

    Best regards,

    James

  27. ozgroup
    Member
    Posted 3 years ago #

    you guys always blame other when your software doesnt work!!!

    why cant you make something that really works with final WP and PHP and or SQL!!!

  28. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    ozgroup,

    1. Your tone is unlikely to get you help.
    2. I gave you my email address to get in touch if you needed further help, which is extraordinarily generous, considering I'm doing this for free.
    3. Why can't YOU make something that really works? If you think you can do better, go for it... that's what open source is all about.

    Regards,

    J.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic