• 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 - 16 through 30 (of 56 total)
  • Plugin Contributor Will Stocks

    (@willstockstech)

    Do you want me to fully reinstall the latest version? i.e. start fresh?

    Basically:
    – I had been using 1.2 for quite some time (probably 6 – 8 weeks) so had a few gravatars in the cache etc.
    – Upgraded to 1.3.0 and saw the original errors
    – Upgraded to 1.3.1 and saw the new errors

    Plugin Author José Miguel

    (@jomisica)

    Yes, if you can do it.

    I’ve set up a machine with php 7.2 and I can not see warnings in version 1.3.2.

    I think it will be some configuration, so it would be necessary to uninstall the plugin through wp-admin and re-install the latest version.

    Plugin Contributor Will Stocks

    (@willstockstech)

    Ahhhhh, OK – I’ll try the fresh install and will let you know!

    Plugin Author José Miguel

    (@jomisica)

    hello @willstockstech,

    1. You’re right when you say that version v1.3.0 has broken wp-admin
    2. You are correct that updating the plugin from v1.2.2 to >= 1.3.0 shows the warnings you presented.

    The problem is verified and I have the solution. The problem is in an option that in versions <1.3.0 was a string and has now become an array. Except that this modification was not done in the activation of the plugin generating problems in the function array_merge, etc.

    But if it’s a fresh install of the plugin this does not happen anymore! Although I’m still waiting for your confirmation!

    Thanks!

    Plugin Contributor Will Stocks

    (@willstockstech)

    Ahhhh, OK I’m with you now! Sorry, I had a really busy day yesterday so I’ll get the fresh install sorted today for you. Give me a couple of hours and I’ll feedback ??

    Plugin Contributor Will Stocks

    (@willstockstech)

    OK. OGC 1.3.2 was installed.

      Deactivated
      Deleted
      Installed OGC 1.3.3
      Activated
      Turned caching on

    Saw the following errors:
    Warning: chmod(): No such file or directory in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1105

    Warning: Cannot modify header information - headers already sent by (output started at /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php:1105) in /WillStocks/wp-admin/includes/misc.php on line 1126

    Also (which based on my very limited understanding, possibly relates to permissions):
    N?o foi possivel criar o directório '/WillStocks/cache/avatar/'.

    N?o foi possivel alpicar as permiss?es '0777' ao directório '/WillStocks/cache/avatar/'.

    Plugin Contributor Will Stocks

    (@willstockstech)

    Created the folder /WillStocks/wp-content/uploads/optimum-gravatar-cache/ manually via FTP with folder perms 755 – re-enabled caching and gravatars are now being cached.

    Plugin Author José Miguel

    (@jomisica)

    I will prevent these warnings. I will internally translate the messages into English.

    Plugin Contributor Will Stocks

    (@willstockstech)

    Thanks – but it did require manual creation of the folder. It didn’t automatically set one up?

    Also, if I enable the optimization options, I get:
    Warning: file_get_contents(/WillStocks/wp-content/uploads/optimum-gravatar-cache/avatar/_.svg): failed to open stream: No such file or directory in /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php on line 1988

    Warning: Cannot modify header information - headers already sent by (output started at /WillStocks/wp-content/plugins/optimum-gravatar-cache/optimum-gravatar-cache.php:1988) in /WillStocks/wp-admin/includes/misc.php on line 1126

    I then refreshed the page and those errors went away immediately. I’m assuming it has something to do with the “Default” gravatar, even though I don’t have one declared and I’m using the “use gravatar until there’s one in the cache” option ??

    Plugin Author José Miguel

    (@jomisica)

    If the webservice runs with a different user from the file system, yes it is not possible to automatically create the cache directory.

    I can do a check and alert the administrator that he has to manually create the cache directory.

    I’ll check the warnings you mentioned.

    • This reply was modified 6 years, 1 month ago by José Miguel.
    • This reply was modified 6 years, 1 month ago by José Miguel.
    Plugin Contributor Will Stocks

    (@willstockstech)

    Strange… other plugins I haven’t had an issue with automatic folder creation in non-plugin directories.
    Autoptimize, for example stores it’s data in /WillStocks/wp-content/cache/ for which I did not have to manually create a folder.
    Hummingbird (caching) also has created 3 of its own folders within wp-content. As far as I’m aware, my wordpress install is running as the same user as the filesystem.

    Plugin Author José Miguel

    (@jomisica)

    Yes but you have saved it with the directory “/WillStocks/cache/avatar/” which is the root of your web server.
    Check the “/WillStocks” directory permissions if you have write permissions.

    Plugin Author José Miguel

    (@jomisica)

    Anyway the warnings should not and will not appear I’m already dealing with this.

    The default cache is “/ your webserver root / cache / avatar” simply that I said at the beginning of the development. This will make the URLs smaller. Also because I use several cache plugins in my webserver and they all keep there static files, etc. But you can and should configure the cache for your needs.

    Plugin Author José Miguel

    (@jomisica)

    The default directory “/WillStocks/cache/avatar/”

    /WillStocks – Your webserver root.
    /cache – Cache any directory, but it must exist.
    /avatar – Avatar is the cache directory of the plugin, it will be created if it does not exist and if you have permissions to write to the “cache” directory.

    “avatar” is just an example of a directory name, it can be any one of your choice.

    Plugin Contributor Will Stocks

    (@willstockstech)

    Just logged into my FTP again to check that the perms for \willstocks\ are there and I can confirm that the same user my WP install is running as can write/create at that level too – which is weird?
    Ah, OK brilliant! ?? I’m pretty happy it’s working now as well anyway (after the fresh install and manual folder creation): https://willstocks.co.uk/

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