WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin] A warning message after updating to 3.5.1 (24 posts)

  1. kaztheman
    Member
    Posted 2 years ago #

    I've seen the following message after updating from 3.5 to 3.5.1 even though I didn't change anything.

    Warning: Invalid argument supplied for foreach() in /wp-content/plugins/yet-another-related-posts-plugin/class-cache.php on line 169

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

  2. Kalian
    Member
    Posted 2 years ago #

    I have the same problem.

  3. frabiacca
    Member
    Posted 2 years ago #

    I have the same problem too. Any solutions?

  4. frabiacca
    Member
    Posted 2 years ago #

    mh, maybe it depends on the weight tax option missing on YARPP settings options, doesn't it?!

  5. frabiacca
    Member
    Posted 2 years ago #

    yep guys, i think i found a solution to that problem - as if, it works to me.
    I had just installed wordpress, new twentyeleven theme; i installed YARPP then but i didn't checked the option to see the hidden divs (those where you can set weight tax values)

  6. kaztheman
    Member
    Posted 2 years ago #

    This is not a solution, but I downgraded to 3.5, and then updated to 3.5.1 again. The message disappeared. I don't not know the reason.

  7. frabiacca
    Member
    Posted 2 years ago #

    could you setup tax weigth on yarpp settings option, before uninstall it?!
    i solved that way ...

    just because on line 169 plugins try to cycle on $weight['tax'] ...

  8. kaztheman
    Member
    Posted 2 years ago #

    frabiacca

    Sorry! my expression was wrong. Your solution may work, but what I did (downgrading and updating again) was not a solution even though the problem was solved in my case.

  9. Jeff
    Member
    Posted 2 years ago #

    I'm getting a different error. I checked the front end UI and see related posts on existing articles. However, in the post editor I'm getting the following error within the Related Posts block on existing and new posts:

    php_code_error:1:/home/webphysi/public_html/wpb/wp-content/plugins/yet-another-related-posts-plugin/class-admin.php:237:Call to a member function get_post_types() on a non-object

    Here's a screenshot: http://screencast.com/t/dCQCFRylB

    YARPP 3.5.1 on WP 3.3.1

  10. lukeryan
    Member
    Posted 2 years ago #

    I'm having the same issue:
    Warning: Invalid argument supplied for foreach() in /.../wp-content/plugins/yet-another-related-posts-plugin/class-cache.php on line 169

  11. techfreak
    Member
    Posted 2 years ago #

    the bug has been fixed, if you still get such error try some other plugin as YARP takes lots of server resource.

  12. Jeff
    Member
    Posted 2 years ago #

    @techfreak Still looks like version 3.5.1 to me and I'm still getting the Fatal error on line 237 when in the post editor.

  13. techfreak
    Member
    Posted 2 years ago #

    its working great for me, there maybe conflict with other plugins.

  14. lukeryan
    Member
    Posted 2 years ago #

    I'm not sure how everything works, but $weight is an empty array(). If I do a check first, if (count($weight) > 0), then I don't get the error. Unfortunately I'm not sure if that is detrimental to anything. It isn't finding any related articles, but I only have 40 posts, so maybe that's to be expected. My PHP skills are weak, so perhaps somebody else can verify this solution.

  15. techfreak
    Member
    Posted 2 years ago #

    @lukeryan why don't you try other plugins. nrelate is the free wordpress plugin with thumbsnail.

  16. Kalian
    Member
    Posted 2 years ago #

    Change the code on line 169

    foreach ( $weight['tax'] as $tax => $weight ) {
    			$newsql .= " + " . $this->tax_criteria($reference_ID, $tax) . " * " . intval($weight);
    		}

    by this code:

    foreach ( (array) $weight['tax'] as $tax => $weight ) {
    			$newsql .= " + " . $this->tax_criteria($reference_ID, $tax) . " * " . intval($weight);
    		}

    Now warning message dissapear.

  17. Paul de Wouters
    Human Made
    Posted 2 years ago #

    just reporting the same error. is there a good alternative to this plugin?

  18. Jeff
    Member
    Posted 2 years ago #

    Paul,

    I'm not aware of other plugins that work as well as this one. There is a beta version out that fixed the issue for me, though, I'm still trying to find out if it is solid enough to release in my clients' production environments. My open question and details on the beta version are on this thread:

    http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-351-error-call-to-a-member-function

    Cheers,

    Jeff

  19. Paul de Wouters
    Human Made
    Posted 2 years ago #

    thanks Jeff.

    I went ahead and implemented the suggested fix above and it seems to work now.
    I really need the custom template functionality, so this is the only option for me right now.

  20. dreamingof8a
    Member
    Posted 2 years ago #

    I had the same error showing and all I had to do was show all options in the admin area and setup th etag/category etc settings.

  21. forfuture
    Member
    Posted 2 years ago #

    Please help find Alasalam after the inauguration of this

    There is a new beta (3.5.2b1) of Yet Another Related Posts Plugin. You can download it here at your own risk.
    There is a new beta (3.5.2b1) of Yet Another Related Posts Plugin. You can download it here at your own risk.
    That might explain the settings added!!

  22. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    Hi all, I believe these issues are fixed in the latest development build: http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.zip Please let me know if that helps.

  23. forfuture
    Member
    Posted 1 year ago #

    Thank you the problem has been resolved .. my respects ..

  24. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    Fantastic! Thanks for letting us know.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic