WordPress.org

Forums

Invalid argument supplied : comments-popup.php (3 posts)

  1. c
    Member
    Posted 9 years ago #

    I have popup comments set up and when I try to access the popup through the 'comments_popup_link' on my blog page I get the error:

    Warning: Invalid argument supplied for foreach() in foo/bar/wp-content/themes/mytheme/comments-popup.php on line 4

    Line 4 in this file is:
    foreach ($posts as $post) { start_wp();

    -which is the exact line found in the other themes
    The somewhat interesting thing is that I only get this error for posts from one of my two post categories. The category that gives the error is the one I have set to not show up on the front page, but I dont see how this should be an issue since the popup is a different page altogether.
    The one category works perfectly when accessing the popup comments, its only the second category that gives the error.

    one post that gives an error is at:
    http://www.waitinglinetheory.com/news/2006/01/02/

    I've searched all through the WordPress support and only found a couple posts asking abt this similar error, but no solutions have been provided

    In case this is helpful I am using:
    Wordpress 2.0
    Event Calendar 3.0.3
    Wordpress Backup Database 1.7

    Is there anyone who has ideas on this one? I'd hate to hate to stop using the popups...they're so cool

    thanks for any help,
    chris

  2. moshu
    Member
    Posted 9 years ago #

    It is very easy to check. Temporarily disable the "hiding" (code, plugin, whatever) and see if the popup comments work on the now-visible category.

    If they do, there is some conflict between the method you use to hide them and the popup.
    If they don't... further digging ahead :)

  3. javito
    Member
    Posted 9 years ago #

    I have exactly the same problem, I have check your website and It seems to work ok now, how did you resolve it?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic