Support » Plugin: WordPress Popular Posts » [Plugin: WordPress Popular Posts] Strange error message – plug in not working

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Rick,

    It seems that it’s your theme what is causing the error, see:

    /home/downsynd/public_html/noahsdad.com/wp-content/themes/standard/functions.php

    The functions.php file belongs to your theme, WordPress Popular Posts has nothing to do with that my friend.

    I’m having the same error and contacted the author’s of the theme that Rick and I have — Standard 3, one of WordPress’s finest.

    They informed me that the second argument is there and that it is actually an issue with the plugin.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Would need to get the theme a run some tests. It’s kinda hard to debug something without testing. Can you please provide the URL of this theme so I can check it out?

    Plugin Author Hector Cabrera

    (@hcabrera)

    Thanks for the link. However, since this theme can’t be downloaded for free there’s not much I can do. Sorry.

    Rick or jca325,

    Did you ever figure this out? I am having the same problem.

    By the way,

    Over on another plugin with similar errors, the correction was this:

    –Seems that a “the_title filter fix” was needed.

    http://wordpress.org/support/topic/plugin-testimonials-widget-warning-missing-argument-2?replies=5

    Can “the_title filter fix” be added to this plugin?

    I did a little research and then tweaked the following two lines of wordpress-popular-posts.php

    $title = apply_filters(‘the_title’, $title);
    $title_sub = apply_filters(‘the_title’, $title_sub);

    to this:

    $title = apply_filters(‘the_title’, $title, $id);
    $title_sub = apply_filters(‘the_title’, $title_sub, $id);

    I am not sure exactly what this does, but the error message has gone away…

    Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Jeremy,

    Thanks for the notice. Just checked the thread you linked to and the developer said this:

    Is it a widget having the trouble? If so, my trouble was using the wrong filter. The correct looks like the following.

    $title = apply_filters( 'widget_title', $instance['title'], null );

    Since I can’t reproduce the problem, could you please test that for me?

    Hector,

    No, that didn’t work. Same error message.

    Adding the $id to each of the lines as in my comment above did get rid of the error message, and when I went to inspect the function that is being affected, argument 2 is indeed “$id”.

    Plugin Author Hector Cabrera

    (@hcabrera)

    Alright, thanks Jeremy! I’ll make sure to have your fix included on the next release.

    Thank you!

    P.S.: the $id variable in that specific part of the code is missing in the last version of the plugin, so I’m guessing the filter is taking it as null.

    Thanks for figuring this out!

    Hector, are you have this message with either the Most Commented or Similar Post plugin? Because I just changed to the Standard theme and encountered this message with both.

    In case anyone wonders, I got through the Most Commented Widget plugin by changing this line:

    $post_title = apply_filters( 'the_title', $post->post_title, $this);

    to this:

    $post_title = apply_filters( 'the_title', $post->post_title, $this->id );

    Plugin Author Hector Cabrera

    (@hcabrera)

    It seems to be a bug caused by either the theme or WordPress itself, but more likely by the theme as it doesn’t occur with Twenty Eleven or any other theme I have tested.

    I will, however, include this modification in the next release.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Plugin: WordPress Popular Posts] Strange error message – plug in not working’ is closed to new replies.