WordPress.org

Ready to get started?Download WordPress

Forums

MailChimp Widget
[resolved] Invalid Argument (foreach), and Confirmation Message not showing up (21 posts)

  1. iftomkins
    Member
    Posted 3 years ago #

    I love that you can have multiple instances of the widget apply to different lists, so I'm really excited to use the plugin, but I'm having a couple challenges.

    First, is that sometimes I get this message at the top of the widget box, which I think might be causing some of the other challenges:
    Warning: Invalid argument supplied for foreach() in /mailchimp-widget/lib/ns_widget_mailchimp.class.php on line 90

    Next, I can't get confirmation message, when an email address is successfully entered, to show up.

    Finally, I'd love to be able to make the signup list stay visible even after the user has signed up. Is there any way to disable to part of the plugin which uses cookies to do this?

    Thanks so much!
    Alan

  2. winterstreet
    Member
    Posted 3 years ago #

    I too love the widget, especially the simplicity.
    and ditto for me on the same problems. Thanks

  3. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Alan,

    Thank you for using the widget and thanks for your feedback.

    Could you give me a URL where you're running into the foreach issue? If I've got a url to look at I'm likely to be of more help.

    As to keeping the signup list visible after a user signs up:

    1. As a user, I prefer newsletter signups and things like that as unobtrusive as possible. Especially if I've already signed up for a list, I don't want to see it anymore. That's why I've designed the plugin as I have. (This is the 2nd request I've had for this, though, so I may cave and make an admin option to turn this off).

    2. That's my preaching bit. Here's the answer you're looking for: To mod the existing plugin, comment out line 270 of /lib/ns_widget_mailchimp.class.php and replace it with if (false) {. That should work. If it doesn't please do let me know.

    Cheers,

    James

  4. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Winterstreet,

    If you could also provide a url where I can see the foreach issue, please do, as it'll help me debug the problem.

    Cheers,

    James

  5. iftomkins
    Member
    Posted 3 years ago #

    Hi James, thanks for your response, and for the tip about making the form stay around after submission. I decided to embed the form directly using code generated in the mailchimp list settings. Then I copied and pasted the code into a text/html widget. That means I unfortunately don't have a URL for you.

    This works out better for me in the end, because I can then have people click checkboxes to indicate which items they want to get email updates about (Mailchimp list groups feature http://blog.mailchimp.com/sending-targeted-emails-with-interest-groups/). I then have RSS Driven Campaigns that will send to the corresponding specific interest groups.

    Thanks again! Alan

  6. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    As a further update, I've taken a look at the code, and line 90 of the relevant file is referring to the list of mailing lists on MailChimp. Since the problem is intermittent, I suspect that a connectivity issue with MailChimp is the culprit. I'm going to investigate this further, and, in advance of releasing a 1.0, I'll be sure to at least provide better handling of the errors in this situation.

    Getting urls where I can look at the problem would still be helpful, mostly where there are difficulties in processing the signups, as it'll give me more data to go on.

    Cheers,

    James

  7. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for your reply, Alan.

    Interest groups definitely _are_ cool, and support for them is something I will want to look at for a future release of my plugin. Anything that makes email marketing more targeted I'm totally for.

    Cheers,

    James

  8. winterstreet
    Member
    Posted 3 years ago #

    The site is http://winterstreetdesign.com but I only see the error message when I'm in the admin section, it shows at the top of the widget when it's opened to edit the settings. Appreciate the quick response. Thanks

  9. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Winterstreet,

    I had a look at your site and wasn't able to figure out from there what the issue is. Why don't you email me directly (my email address is in the plugin documentation), and I'll be happy to help figure out what's going on. Once we do, I'll post back to the forum with our findings.

    Cheers,

    James

  10. winterstreet
    Member
    Posted 3 years ago #

    jameslafferty,
    I'm sorry I wasn't clear about the problem I was having. My problem was limited to the error message in the admin. Not with the confirmation message. If you still need me to email you let me know.
    Thanks

  11. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Sorry 'bout the radio silence for a couple days there. Was busily engaged in remunerative work :)

    If you could email me directly, winterstreet, it would indeed be helpful. I'd like to get this glitch ironed out so I can ensure it doesn't turn up/is handled better in future releases.

    Thank you so much!

    James

  12. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Thank you again to winterstreet for getting back in touch with me. We've concluded that the issue is to do with intermittent connection issues to MailChimp. I'm going to set up better error handling for this problem in the next release of the plugin, and in the meantime am marking the issue resolved, as winterstreet has only seen it crop up once, and it's not preventing the plugin from working correctly in most instances.

    If you come across this, and are having the same trouble, but suspect a different cause, please do let me know. :)

    Cheers,

    James

  13. David C
    Member
    Posted 3 years ago #

    I had the same problem and figured out a fix. The mailchimp-widget\lib\mcapi.class.php file needs to be updated.

    Just download the example code from MailChimp and copy the \inc\mcapi.class.php into your mailchimp-widget\lib\ folder to overwrite the old version.

    http://apidocs.mailchimp.com/downloads/mcapi-simple-subscribe-jquery.zip

    ~David

  14. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for pointing this out, David. I've released an update with the current version of the MailChimp API. And, of course, cited you in the update notice and changelog :)

    Cheers,

    James

  15. ovib
    Member
    Posted 3 years ago #

    Same problem here with the last plugin version and last mcapi.class.php file downloaded from the David link. Some idea?

  16. jameslafferty
    Member
    Plugin Author

    Posted 3 years ago #

    The current version of the plugin uses the latest MailChimp API wrapper (no need to download additional files). Could you give me a url to look at?

    Cheers,

    J.

  17. ovib
    Member
    Posted 3 years ago #

    The error come with the last version of plugin without any modify. Then I found this thread and I did the test with the specified file without any result.

    It seems strange that others have the same problem solved by downloading the mcapi.class.php, while I do not ...

    As mentioned by others, the error occurs in the widget control panel. So, you would not be able to see the error simply by visiting the site.
    However this is the site, http://www.liber-rebil.it

  18. ovib
    Member
    Posted 3 years ago #

    PS. I have WP 3.2

  19. ovib
    Member
    Posted 3 years ago #

    LOL the problem is just the wrong API key... I found my API key with this help article, http://kb.mailchimp.com/article/where-can-i-find-my-api-key/

    All ok, sorry for disturb and thanks for the plugin! :)

  20. kierancooper
    Member
    Posted 2 years ago #

    I just started a new thread as I'm getting this same error - but this time it is occuring on line 1189 of mailchimp.php - and it occurs every time the form is used. The signup process works so it can't be a connectivity issue.

    WP 3.2.1
    Mailchimp 1.2.5

    The new support thread is http://wordpress.org/support/topic/plugin-mailchimp-list-subscribe-form-php-invalid-argument-error

  21. jameslafferty
    Member
    Plugin Author

    Posted 2 years ago #

    Just to be 100% clear, the plugin kieran is using is not MailChimp Widget, but MailChimp List Subscribe Form. Please let me know if you see the issue coming up again with MailChimp Widget. :)

    Cheers,

    J.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic