WordPress.org

Ready to get started?Download WordPress

Forums

Shareaholic | share buttons & related posts
[resolved] Errors being thrown by plugin (5 posts)

  1. simonhagger
    Member
    Posted 6 months ago #

    Hi,

    Shareaholic plugin is causing this "warning" error when I turn on debugging in wordpress.

    Backtrace from warning 'call_user_func_array() expects parameter 1 to be a valid callback, non-static method ShareaholicUtilities::admin_bar_extended() should not be called statically' at /home/sitefolder/public_html/wp-includes/plugin.php 429:

    /home/sitefolder/public_html/wp-includes/plugin.php 429 calling call_user_func_array()
    /home/sitefolder/public_html/wp-includes/admin-bar.php 84 calling do_action()
    calling wp_admin_bar_render()
    /home/sitefolder/public_html/wp-includes/plugin.php 429 calling call_user_func_array()
    /home/sitefolder/public_html/wp-admin/admin-header.php 195 calling do_action()
    /home/sitefolder/public_html/wp-admin/plugin-editor.php 138 calling require_once()

    I also note that the W3C Validator throws up 13 errors up for Shareaholic added html elements. They all appear to be meta elements that have been purposefully misnamed, but if you are a purist and want your site to validate etc, this is a concern.

    Thanks,

    Simon

    https://wordpress.org/plugins/shareaholic/

  2. simonhagger
    Member
    Posted 6 months ago #

    I also get the following error on the actual site pages:

    Backtrace from warning 'Array to string conversion' at /home/sitefolder/public_html/wp-content/plugins/shareaholic/public.php 137:
    /home/sitefolder/public_html/wp-content/plugins/shareaholic/public.php 94 calling draw_keywords_meta_tag()
    /home/sitefolder/public_html/wp-content/plugins/shareaholic/public.php 35 calling shareaholic_tags()

    I fixed the former error by making the function at fault "admin_bar_extended()" called as a public static function in the utilities.php file.

  3. simonhagger
    Member
    Posted 6 months ago #

    I have made changes to the public.php file (around line 123) as follows to kill off the error:

    $categoryString = '';

    if($categories) {
    foreach($categories as $category) {
    if ($category->cat_name != "Uncategorized") {
    $output .= $separator.$category->cat_name;
    }
    }
    $categoryString = trim($output, $separator);
    }

    // Merge post tags and categories
    if ($keywords != ''){
    $keywords .= ', '.$categoryString;
    } else {
    $keywords .= $categoryString;
    }

    Please fold the above fixes into the plugin to consider this one resolved.

  4. Shareaholic
    Member
    Plugin Author

    Posted 6 months ago #

    @simonhagger

    This fix for this has been released: http://wordpress.org/plugins/shareaholic/changelog/

    Can you please upgrade and test if the issue is fixed for you? Thanks so much!

  5. Shareaholic
    Member
    Plugin Author

    Posted 6 months ago #

    ps - thanks so much for reporting it in the first place!

Reply

You must log in to post.

About this Plugin

About this Topic