WordPress.org

Ready to get started?Download WordPress

Forums

Subscribe2
[resolved] Error: 'Warning: implode() [function.implode]' (24 posts)

  1. jennybeaumont
    Member
    Posted 2 years ago #

    Hey folks,

    Subscribe2 just stopped working on a site I manage a couple months ago. After following this thread, I followed along and then sent myself a "preview" email. The email arrived just fine, but the following error was left on the page:

    Warning: implode() [function.implode]: Invalid arguments passed in /home/content/xxx/html/wp-content/plugins/subscribe2/classes/class-s2-core.php on line 543

    The site is hosted with GoDaddy, but I'm really hoping there's another solution out there than changing hosts. Ideas?

    thnx!
    -jennyb

    http://wordpress.org/extend/plugins/subscribe2/

  2. jennybeaumont
    Member
    Posted 2 years ago #

    Also, I just noticed that for the two times I sent the preview mail, I received 4 copies each time.
    ??

  3. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @jennybeaumont,

    I cannot reproduce the first error you are getting. As for 4 emails arriving, this is expected behaviour in per-post mode, it's one email for each of the different options available.

  4. jennybeaumont
    Member
    Posted 2 years ago #

    Question: should Subscribe2 create a table in the database?

  5. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @jennybeaumont,

    Yes, it needs a table to hold the details for the Public Subscribers.

  6. jennybeaumont
    Member
    Posted 2 years ago #

    Oh right, of course. I've got that one; I guess I was wondering if there was an additional one for options.

    Hmmm, so line 543 corresponds to

    $this->post_cat_names = implode(', ', wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'names')));
    		$this->post_tag_names = implode(', ', wp_get_post_tags($post->ID, array('fields' => 'names')));

    Any ideas where to start on this? Do you think this could be a server problem? At a loss as to how to attack this problem...

    thnx,
    -jennyb

  7. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @jennybeaumont,

    What version of WordPress are you using? Are you using any custom post types or taxonomies?

    What categories (or taxonomies) is your most recent post assigned to?

  8. jennybeaumont
    Member
    Posted 2 years ago #

    Heya,

    The site is running on V3.3.1. Posts are organized by category only, and the most recent post is assigned to 3 different categories (A year in a French market: Spring, Mastering the Art of French Eating, Recettes)

    thnx,
    -jennyb

  9. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @jennybeaumont,

    I've run WordPress 3.3.1 and more recently 3.3.2 without seeing this issue. Does is still happen if you disable all other plugins?

    I'll check the multiple category thing later but this far I still cannot reproduce this error message and until I can I can't figure out a fix.

  10. jennybeaumont
    Member
    Posted 2 years ago #

    Yes, the error shows even after disabling all other plugins :(

    thanks again for you help.
    -jennyb

  11. jennybeaumont
    Member
    Posted 2 years ago #

    Just tried reducing to one category, but the error still occurred.

    thnx,
    -jennyb

  12. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @jennybeaumont,

    Thanks for doing some checking. What theme are you using?

  13. jennybeaumont
    Member
    Posted 2 years ago #

    Of course! :)
    This is the website:
    http://annmah.net/

    And it looks like the theme was done by this guy:
    http://corymiller.com/

    I haven't touched it (the theme) much at all. Mostly I've been helping Ann with upgrades and new plugins. She was originally on a very old version of WordPress. Didn't occur to me to look toward the theme since I didn't think the Subscribe2 interacted much with it. Subscriptions, etc all work fine. It's just the sending of the emails that was working great in the beginning (post WP upgrade, after installing the plugin), then just stopped at some point.

    I've also been having trouble with Xcloner on her site, which has generally worked great for me on other client sites. The only other major change that the site has undergone was a hosting upgrade at Godaddy. Recent feedback about Godaddy hasn't been great - do you think that could be it?

    thnx!
    -jennyb

  14. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @jennybeaumont,

    Themes can make enormous changes to WordPress, normally via the functions.php file. The Theme appears to be a paid and custom solution.

    That said, from what you said above about things working fine (post-upgrade) and then suddenly stopping I strongly suspect that it's GoDaddy. they seem pretty awful at the moment and several people have reports their websites have 100% restored functionality on leaving GoDaddy.

  15. jennybeaumont
    Member
    Posted 2 years ago #

    I just got a word back from the Xcloner guy who says that problem is also related to a server file. Godaddy it is. Sigh.

    thnx for all your help!
    -jennyb

  16. Brunzo
    Member
    Posted 2 years ago #

    Hi,
    I'm getting the same error too, we are on a VPS server, and we have 2 installation of the same website (DEV and PRODUCTION)

    When I try to send a Preview Email from the settings page, I get the same error.

    The weird thing is that in production is not working, and in Dev is ok instead.

    The server configuration is the same, so there's must be something else.

    Warning: implode() [function.implode]: Invalid arguments passed in /home/XXXXXXX/public_html/wp-content/plugins/subscribe2/classes/class-s2-core.php on line 543

    Any idea?

    Thanks

  17. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Brunzo,

    Okay, so the server is the same, but Subscribe2 code is the same also. If it works on one but not another, as you rightly point out, something must be different. You tell me?

    Are you using exactly the same theme and set of plugins on the 2 sites? Are you sure the PHP configuration is identical? (php.ini files can be domain specific).

    as I've said above, until I have steps to re-produce the error I cannot being to fix it as I can't guess where the issue might be coming from.

  18. Brunzo
    Member
    Posted 2 years ago #

    @MattyRob,
    Yes, that makes sense, and it is weird!

    I have:
    -Same plugin set
    -same php.ini
    -same configuration
    -same template

    Is there any debug or test that would be helpful to understand why this is happening?

    thanks.

  19. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Brunzo,

    There is no debug code but if you are happy playing with code you can run some tests.

    Find line 543 in the class-s2-core.php file; it should be like this:

    $this->post_cat_names = implode(', ', wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'names')));
    $this->post_tag_names = implode(', ', wp_get_post_tags($post->ID, array('fields' => 'names')));

    Before that break the code in those lines down to see if we can isolate the issue. Something like:
    `var_dump(wp_get_object_terms($post->ID, $s2_taxonomies, array('fields' => 'names')));

    That should return an array, if it doesn't then the next step is to figure out why WordPress thinks your post has no category names attached to it.

  20. Brunzo
    Member
    Posted 2 years ago #

    @MattyRob,
    I tried the code mentioned above but I got no luck.

    Are you available to work on this?
    I'm ok either donate or pay you for the time you spend on this.

    Thanks.

  21. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Brunzo,

    If you are happy to and can give me access to you site (WordPress, cPanel, PHPMyAdmin etc) then I'll take a look. Contact me via here.

  22. jennybeaumont
    Member
    Posted 2 years ago #

    For info, though the error message persists when I do a test send, the plugin has started working again! Users are getting updates! Wish I know what I did...basically I reset the config and then re-edited for our needs. In any case, it worked!
    -jennyb

  23. Julian99
    Member
    Posted 2 years ago #

    Hello,
    @mattyrob

    I have the same error
    Warning: implode() [function.implode]: Invalid arguments passed in /home/content/xxx/html/wp-content/plugins/subscribe2/...

    My intuition is wp cache plug in.
    When de activated, my mails are leaving otherwise nothing happens.
    if it can helps..

    bye

  24. mattyrob
    Member
    Plugin Contributor

    Posted 2 years ago #

    @Julian99,

    I was doing some paid work for a client with several WordPress issues when this one cropped up on his site. I was able to fully debug it there and have patched it in the Subscribe2 code. It will be fixed in 8.3 but if you can't wait until then use the development code.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags