WordPress.org

Ready to get started?Download WordPress

Forums

Feature A Page Widget
[resolved] Version 1.2.4 breaks the_exceprt filters (7 posts)

  1. phrenq
    Member
    Posted 10 months ago #

    Had to roll back to the previous version, as 1.2.4 caused this line (elsewhere on the same page):

    apply_filters( 'the_excerpt', $post->post_excerpt );

    to dump this warning:

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Array' was given in /<snip>/wp-includes/plugin.php on line 173.

    http://wordpress.org/plugins/feature-a-page-widget/

  2. mrwweb
    Member
    Plugin Author

    Posted 10 months ago #

    Hi @phrenq. Thanks for reporting this issue.

    I can't replicate that warning using Feature a Page Widget 1.2.4 and Twenty Twelve.

    If you could provide the following information, that may help me see if this is a problem with the plugin or something else:

    • Do I understand you correctly that the error you got was in another theme or plugin?
    • Can you post a longer excerpt of the code that actually has the error. (pastebin or gist)?
    • Did you update other plugins at the same time?
  3. phrenq
    Member
    Posted 10 months ago #

    Sorry for the delay -- it took me a bit to narrow down the key steps to reproduce.

    You should be able to repro in Twenty Twelve, if you replace index.php with this file: https://gist.github.com/frankpape/44eb1fd8499394ea0988

    I did this in a fresh test WordPress install, with no other plugins installed. The only content changes I made were to add some manual excerpts to the sample post and the sample page.

    They key points are:
    1. The sidebar with the Feature a Page Widget must be rendered before the loop.
    2. The apply_filters call should happen inside the loop.

    Hope that helps!

  4. mrwweb
    Member
    Plugin Author

    Posted 10 months ago #

    Thanks for this, @phrenq. I'll look into this and try to get a fix out sometime this week.

  5. mrwweb
    Member
    Plugin Author

    Posted 10 months ago #

    Thanks for all your help on this, @phrenq. You've earned yourself a changelog shoutout :)

    I just pushed out version 1.2.5 that at least resolves the problem you helped me recreate on my test site. it rolls back a key change made in 1.2.4, so I suspect that 1.2.5 will work for you without problem.

    If you could, please let me know if you can safely upgrade. I'll hold off on marking this as resolved until then.

  6. phrenq
    Member
    Posted 9 months ago #

    Glad I could help! 1.2.5 is looking fine on my end. Thanks for the useful plugin :).

  7. mrwweb
    Member
    Plugin Author

    Posted 9 months ago #

    Great. Thanks again for your help. Marking this as resolved.

Reply

You must log in to post.

About this Plugin

About this Topic