WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] Problem adding/editing posts after upgrading to YARPP 3.2 (6 posts)

  1. webforge
    Member
    Posted 3 years ago #

    Hi,

    Since upgrading to YARPP 3.2.1b1, every time I add a new post or edit an existing post, I get error messages like the following:

    Warning: Missing argument 2 for yarpp_status_transition() in /home/user/public_html/wp-content/plugins/yet-another-related-posts-plugin/magic.php on line 355
    
    Warning: Missing argument 3 for yarpp_status_transition() in /home/user/public_html/wp-content/plugins/yet-another-related-posts-plugin/magic.php on line 355
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/user/public_html/wp-content/plugins/yet-another-related-posts-plugin/magic.php:355) in /home/wordpress/latest/wp-includes/pluggable.php on line 890

    So it seems that $old_status and $post are not being passed to the yarpp_status_transition function.

    Any ideas? I'll have to disable the plugin on multiple sites until fixed... :(

    Thanks.

  2. webforge
    Member
    Posted 3 years ago #

    UPDATE:

    If I comment out line 56 of yarpp.php

    add_action('transition_post_status','yarpp_status_transition', 3);

    the problem goes away - but post transitions are no longer handled (new in 3.2.1). Better to pass in $old_status and $post correctly...

  3. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

    Sorry, yeah, that needs to be modified, as mentioned here:

    http://wordpress.org/support/topic/plugin-yet-another-related-posts-plugin-showing-yarp-widget-in-pages-and-subpages

    It'll be updated in the next beta.

  4. ProfitProphet
    Member
    Posted 3 years ago #

    I had the same problem, changing yarpp.php line 56 to this worked for me:

    add_action('transition_post_status','yarpp_status_transition', 10, 3);

    Thank you for posting it mitcho!

  5. webforge
    Member
    Posted 3 years ago #

    @mitcho - thanks for the fix. looking forward to the next beta :)

  6. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 3 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic