Support » Plugin: Optimum Gravatar Cache » v1.3.0 has broken wp-admin

  • ResolvedPlugin Contributor Will Stocks

    (@willstockstech)


    Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php:135 Stack trace: #0 /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php(2772): OGC->__construct() #1 /WillStocks/wp-settings.php(305): include_once('/WillStocks/wp-co...') #2 /WillStocks/wp-config.php(47): require_once('/WillStocks/wp-co...') #3 /WillStocks/wp-load.php(37): require_once('/WillStocks/wp-co...') #4 /WillStocks/wp-admin/admin.php(31): require_once('//WillStocks/wp-co...') #5 /WillStocks/wp-admin/index.php(10): require_once('/WillStocks/wp-co...') #6 {main} thrown in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 135

    I have had to disable the plugin due to the above error being shown on WP-Admin

Viewing 15 replies - 1 through 15 (of 56 total)
  • Plugin Author José Miguel

    (@jomisica)

    I added “wp-includes / pluggable.php” I think it solves the situation.
    Reinstall the plugin.

    Plugin Author José Miguel

    (@jomisica)

    Let me know if the issue is resolved.

    Tell me the version of wordpress and php in question.

    Plugin Contributor Will Stocks

    (@willstockstech)

    WP 4.9.8
    PHP 7.2.10

    Almost there! That’s sorted the lockout issue, now though I’m seeing:
    Warning: array_merge(): Argument #1 is not an array in /homepages/28/d644178550/htdocs/clickandbuilds/WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1284

    Warning: Invalid argument supplied for foreach() in /homepages/28/d644178550/htdocs/clickandbuilds/WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1287

    The plugin generated 221 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    Plugin Author José Miguel

    (@jomisica)

    Well I like the stance you have to point out the mistakes. I really do. This is how I can improve the plugin to the max. Hopefully everyone who uses the plugin will.

    But tell me one thing you show the errors in html in production?

    I’m solving the warnings, also with pleasure.

    Plugin Author José Miguel

    (@jomisica)

    I already made the modifications and uploaded another version.

    If you have solved the problem, mark it as resolved!

    Plugin Contributor Will Stocks

    (@willstockstech)

    Sorry – went to sleep! 🙂

    Personally, I’ve always thought that providing constructive feedback/assistance is a useful thing – especially when the product is good/could be really good. It’s always useful to have an extra set of eyes on something as well 😉

    Yes, I was seeing the errors in production.

    Just updating now!

    Plugin Contributor Will Stocks

    (@willstockstech)

    OK, so two of the errors are now gone, but I’m seeing:
    Warning: count(): Parameter must be an array or an object that implements Countable in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1283

    Warning: array_merge(): Argument #1 is not an array in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1284

    Warning: count(): Parameter must be an array or an object that implements Countable in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1287

    Plugin Contributor Will Stocks

    (@willstockstech)

    I’m guessing it’s something to do with a PHP 7.2 backwards incompatible change: http://php.net/manual/en/migration72.incompatible.php#migration72.incompatible.warn-on-non-countable-types

    Plugin Author José Miguel

    (@jomisica)

    Thanks @willstockstech for the feedback!

    I want and I will support the new versions of php, but for this I have to build a new machine with the same versions. It’s going to take some time because I have other commitments.

    Use version 1.2.2 for a few days.

    I need a machine with php 7.2.

    Plugin Contributor Will Stocks

    (@willstockstech)

    Thanks @jomisica 🙂

    Don’t suppose you have a download link for the zip of 1.2.2 do you? 😉

    Plugin Contributor Will Stocks

    (@willstockstech)

    I’ve deactivated the plugin for now – I’ll wait it out until you have a PHP 7.2 version ready 🙂

    Plugin Author José Miguel

    (@jomisica)

    Okay, but it may take some time.

    The link to version 1.2.2:
    https://downloads.wordpress.org/plugin/optimum-gravatar-cache.1.2.2.zip

    If it worked before it will work now, uninstall the current version to remove the preferences and the table and manually install version 1.2.2 with Zip!

    Plugin Contributor Will Stocks

    (@willstockstech)

    Nice, thanks! I’ll try to get that installed later this week! 🙂

    Looking forward to the PHP 7.2/7.3 version!

    Plugin Author José Miguel

    (@jomisica)

    Hello @willstockstech,

    can you replay the steps for the warnings?

    I have already created a machine for the purpose and I only have messages like the following:
    PHP Notice: Undefined offset: 0 in

    What I will correct however is not related!

    Plugin Author José Miguel

    (@jomisica)

    Please try again to install the plugin, but first uninstall the current version because there have been changes in the options variables.

    Uninstall to remove the plugin table, the plugin settings, as well as the plugin’s cache directory.

    I knew it would cause some problems but I did not want to release version 2.0.

Viewing 15 replies - 1 through 15 (of 56 total)
  • The topic ‘v1.3.0 has broken wp-admin’ is closed to new replies.