WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] Invalid argument supplied for foreach() in ../class-cache (4 posts)

  1. woppywush
    Member
    Posted 2 years ago #

    after upgrade to the latest YARPP, my site no longer showing the related posts ("No related posts").

    i've got this warning on my php-fpm log
    PHP Warning: Invalid argument supplied for foreach() in ../wp-content/plugins/yet-another-related-posts-plugin/class-cache.php on line 169

    Im using wp 3.3.1 // php 5.3.8 // nginx 1.0.12

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm... by chance are you not considering any taxonomies in YARPP settings? Or are you calling yarpp_related() or related_posts() or somesuch directly, with custom arguments?

  3. woppywush
    Member
    Posted 2 years ago #

    im using related_entries() but i changed to yarpp_related() and added some value on "relatedness option"
    bodies --> consider with extra weight)

    it seems the related posts now is working

    but still i've got php warning in my log:
    ....
    [04-Mar-2012 03:55:17] PHP Warning: Invalid argument supplied for foreach() in ../wp-content/plugins/yet-another-related-posts-plugin/class-cache.php on line 169
    [04-Mar-2012 03:55:21] PHP Warning: Invalid argument supplied for foreach() in ../wp-content/plugins/yet-another-related-posts-plugin/class-cache.php on line 169
    [04-Mar-2012 03:55:23] PHP Warning: Invalid argument supplied for foreach() in ../wp-content/plugins/yet-another-related-posts-plugin/class-cache.php on line 169
    ....

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    Is there a reason you switched from related_entries() to yarpp_related()? Are you passing extra arguments into those functions? What happens if you change your YARPP settings to consider at least one taxonomy?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic