Support » Plugin: Avatar Privacy » Broke website after unattended update last night

  • Resolved ThomTra

    (@thomtra)


    Broke website after unattended update last night from version 2.3.4 to 2.4.0.

    The Error is:

    Ein Fehler vom Typ E_ERROR wurde in der Zeile 202 der Datei /var/www/___/wp-content/plugins/avatar-privacy/includes/avatar-privacy/core/class-settings.php verursacht.

    Errormessage: Uncaught UnexpectedValueException: Invalid setting name ‘gravatar_use_default’. in /var/www/___/wp-content/plugins/avatar-privacy/includes/avatar-privacy/core/class-settings.php:202

    Stack trace:
    #0 /var/www/___/wp-content/plugins/avatar-privacy/includes/avatar-privacy/components/class-avatar-handling.php(157): Avatar_Privacy\Core\Settings->get()
    #1 /var/www/___/wp-includes/class-wp-hook.php(287): Avatar_Privacy\Components\Avatar_Handling->enable_presets()
    #2 /var/www/___/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
    #3 /var/www/___/wp-includes/plugin.php(484): WP_Hook->do_action()
    #4 /var/www/___/wp-settings.php(557): do_action()
    #5 /var/www/___/wp-config.php(101): require_once(‘/var/www/___…’)
    #6 /var/www/___/wp-load.php(37): require_once(‘/var/www/___…’)
    #7 /var/www/___/wp-login.php(12): require(‘/var/www/___…’)
    #8 {main} thrown

Viewing 14 replies - 1 through 14 (of 14 total)
  • Thread Starter ThomTra

    (@thomtra)

    Uninstalled this plugin in recovery mode and installed it again, which seems to fix this issue.

    Plugin Author pepe

    (@pputzer)

    I am sorry about that, I’ll look into it. What versions of WordPress and PHP are running on this machine?

    Thread Starter ThomTra

    (@thomtra)

    PHP:
    PHP 7.4.13 (cli) (built: Nov 30 2020 20:40:09) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.13, Copyright (c), by Zend Technologies

    WP: Version: 5.6

    Another wp install on the same server triggered also the automatic update with the same result. As the mail with the recovery access was missing i deleted the plugin via terminal, and the site recovered. After install via plugin manager the site broke again, but now i got the recovery mail. Uninstalled the pluging in recovery mode and install it again fixed it.

    Seems the setting ‘gravatar_use_default’ wasn’t added in db during update?

    Plugin Author pepe

    (@pputzer)

    That is what it looks like on the surface, but it’s rather unlikely as that setting was added with version 2.0.0. I am assuming that the settings option value in the DB got corrupted somehow. Uninstalling via the GUI deletes all data so that would have fixed this. (Unfortunately this means that all consent settings by users etc. will be gone now – do you have a backup to restore the tables/user_meta?)

    Plugin Author pepe

    (@pputzer)

    Seems it is somehow related to the automatic update process. I’ll try to reproduce it locally and make the settings check more robust to DB corruption. (Because there are so few settings and they have not changed recently, it appears I have been to lax there.)

    • This reply was modified 1 month, 3 weeks ago by pepe. Reason: typo

    New thread …

    • This reply was modified 1 month, 3 weeks ago by teufel100.
    • This reply was modified 1 month, 3 weeks ago by teufel100.
    Plugin Author pepe

    (@pputzer)

    Hi @teufel100, it looks like this is something else entirely. Could you please create a new thread for this?

    Plugin Author pepe

    (@pputzer)

    @thomtra, I’ve not been able to replicate the issue with autoupdates on a MAMP site, but when I edited the value of the avatar_privacy_settings in the database, I could trigger the error. Since you’ve experienced the issue with two sites on your server, is there anything special about them or the DB backend?

    I have the same issue. I believe I also got the error message that @teufel100 experienced but didn’t copy it and have no traces of it.
    MySql Version 5.6

    WordPress version 5.6
    Current theme: Eclipse 2 Child (version 0.1.0)
    Current plugin: Avatar Privacy (version 2.4.0)
    PHP version 7.2.34

    Error Details
    =============
    An error of type E_ERROR was caused in line 202 of the file /mnt/web218/c3/64/54128064/htdocs/wp-content/plugins/avatar-privacy/includes/avatar-privacy/core/class-settings.php. Error message: Uncaught UnexpectedValueException: Invalid setting name ‘gravatar_use_default’. in /mnt/web218/c3/64/54128064/htdocs/wp-content/plugins/avatar-privacy/includes/avatar-privacy/core/class-settings.php:202
    Stack trace:
    #0 /mnt/web218/c3/64/54128064/htdocs/wp-content/plugins/avatar-privacy/includes/avatar-privacy/components/class-avatar-handling.php(157): Avatar_Privacy\Core\Settings->get(‘gravatar_use_de…’)
    #1 /mnt/web218/c3/64/54128064/htdocs/wp-includes/class-wp-hook.php(287): Avatar_Privacy\Components\Avatar_Handling->enable_presets(”)
    #2 /mnt/web218/c3/64/54128064/htdocs/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array)
    #3 /mnt/web218/c3/64/54128064/htdocs/wp-includes/plugin.php(484): WP_Hook->do_action(Array)
    #4 /mnt/web218/c3/64/54128064/htdocs/wp-settings.php(557): do_action(‘init’)
    #5 /mnt/web218/c3/64/54128064/htdocs/wp-config.php(193): require_once(‘/mnt/web218/c3/…’)
    #6 /mnt/web218/c3/64/54128064/htdocs/wp-load.php(37): require_once(‘/mnt/web218/c3/…’)
    #7 /mnt/web218/c3/64

    Plugin Author pepe

    (@pputzer)

    @skiri-ki Please have a look at https://wordpress.org/support/topic/problems-after-update-to-the-new-version/#post-13888473 for the database creation issue, as this is a different error than the one discussed in this thread.

    • This reply was modified 1 month, 3 weeks ago by pepe.
    Plugin Author pepe

    (@pputzer)

    @skiri-ki Can you check what the value of the avatar_privacy_settings option is in the wp_options table? I’m pretty sure that the exception is triggered by database corruption, but I’d like to know what form it takes to determine the root cause.

    Plugin Author pepe

    (@pputzer)

    On further investigation, this happens when gravatar_use_default has never been set (so its missing form the settings array). Version 2.4.1 fixes the issue.

    thanks, yeah 2.4.1 fixes it 🙂

    Thread Starter ThomTra

    (@thomtra)

    I also think, gravatar_use_default was not set and caused this issue. As i already deleted and installed new, i can not say if it was set or not.

    But its okay for me, it works now, your last update was installed with no issues.

Viewing 14 replies - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.