• Resolved TRILOS

    (@trilos)


    WordPress 5.8.3
    Plugin Version 3.1.1

    Showing the log in Dahsboard Widget and on /wp-admin/index.php?page=simple_history_page fails as long as Avatars are disabled on /wp-admin/options-discussion.php

    Plugin notice:

    “`Hm, the log could not be loaded right now. Perhaps another plugin is giving some errors. Anyway, below is the output I got from the server.”</blockquote>
    and WP notice: “<blockquote>There has been a critical error on this website.
    Learn more about troubleshooting WordPress.`

    [https://www.ads-software.com/support/article/faq-troubleshooting/]

    Maybe this depends on activated plugin WPSSO Core https://www.ads-software.com/plugins/wpsso/

    server logfile excerpt:

    [Wed Feb 02 18:01:07.951994 2022] [fcgid:warn] [pid 8506] [client <ip>] mod_fcgid: stderr: PHP Fatal error:  Uncaught ArgumentCountError: Too few arguments to function WpssoPinterest::get_avatar_image_tag(), 5 passed in <path>/wp-includes/class-wp-hook.php on line 303 and exactly 6 expected in <path>/wp-content/plugins/wpsso/lib/pinterest.php:92, referer: <path>/wp-admin/index.php
    [Wed Feb 02 18:01:07.952045 2022] [fcgid:warn] [pid 8506] [client <ip>] mod_fcgid: stderr: Stack trace:, referer: <path>/wp-admin/index.php
    [Wed Feb 02 18:01:07.952051 2022] [fcgid:warn] [pid 8506] [client <ip>] mod_fcgid: stderr: #0 <path>/wp-includes/class-wp-hook.php(303): WpssoPinterest->get_avatar_image_tag(), referer: <path>/wp-admin/index.php
    [Wed Feb 02 18:01:07.952056 2022] [fcgid:warn] [pid 8506] [client <ip>] mod_fcgid: stderr: #1 <path>/wp-includes/plugin.php(189): WP_Hook->apply_filters(), referer: <path>/wp-admin/index.php
    [Wed Feb 02 18:01:07.952061 2022] [fcgid:warn] [pid 8506] [client <ip>] mod_fcgid: stderr: #2 <path>/wp-content/plugins/simple-history/inc/SimpleHistory.php(2921): apply_filters(), referer: <path>/wp-admin/index.php
    [Wed Feb 02 18:01:07.952066 2022] [fcgid:warn] [pid 8506] [client <ip>] mod_fcgid: stderr: #3 <path>/wp-content/plugins/simple-history/loggers/SimpleLogger.php(791): SimpleHistory->get_avatar(), referer: <path>/wp-admin/index.php
    [Wed Feb 02 18:01:07.952071 2022] [fcgid:warn] [pid 8506] [client <ip>] mod_fcgid: stderr: #4 <path>/wp-content/plugins/simple-history/inc/SimpleHistory.php(2310): SimpleLogger->getLogRowSenderImageOu in <path>/wp-content/plugins/wpsso/lib/pinterest.php on line 92, referer: <path>/wp-admin/index.php
    • This topic was modified 2 years, 10 months ago by TRILOS.
Viewing 7 replies - 1 through 7 (of 7 total)
  • The WordPress ‘get_avatar’ filter requires 6 arguments, not 5.

    See here for more info:

    https://developer.www.ads-software.com/reference/hooks/get_avatar/

    Whatever theme or plugin is applying that WordPress filter must provide 6 arguments, not 5.

    js.

    Plugin Author eskapism

    (@eskapism)

    Thanks for the bug report and for finding the reason! I will update this in the text version.

    Thanks. I worked on troubleshooting this same issue with Rank Math, because I thought it was related to their SEO plugin.

    You are getting a critical error on the dashboard page because the Simple history plugin developer is overwriting the get_avatar filter. The filter requires 6 parameters but in the Simple History plugin, only 5 parameters are used.

    For now, to fix the issue on your site I changed the following code on line 2921 in /plugins/simple-history/inc/SimpleHistory.php

    Replaced:

    $avatar = apply_filters( 'get_avatar', $avatar, $email, $size, $default, $alt );

    with:

    $avatar = apply_filters( 'get_avatar', $avatar, $email, $size, $default, $alt, array() );

    Hi,

    I don’t know if I’m in the right place here, but I also noticed that the avatars are trying to load from gravatar.com, even though I disabled them in the WordPress settings. I currently hide them with CSS. I would be happy if data protection were also taken into account more.

    Thanks in advance!

    Plugin Author eskapism

    (@eskapism)

    @st3phan5 thanks for the report. I will take a look and make sure the plugin does not try to load Gravatar images if disabled in WordPress.

    Plugin Author eskapism

    (@eskapism)

    Please check if 3.3.0 solves the problems you had!

    Thread Starter TRILOS

    (@trilos)

    Issue resolved, thank you!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Log view without Avatar fails’ is closed to new replies.