• Resolved igroykt

    (@igroykt)


    Hi.
    Today I got error:

    Fatal error: Declaration of Monolog\Handler\ErrorLogHandler::write(array $record) must be compatible with Monolog\Handler\AbstractProcessingHandler::write(array $record): void in /opt/it/wp-content/plugins/seo-by-rank-math/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php on line 0

    Not sure when it happend, but today I installed Google Kit plugin and I saw error when logged out and tried log in again.
    Monolog info from installed.json:

    {
    “name”: “monolog/monolog”,
    “version”: “1.25.1”,
    “version_normalized”: “1.25.1.0”,
    “source”: {
    “type”: “git”,
    “url”: “https://github.com/Seldaek/monolog.git”,
    “reference”: “70e65a5470a42cfec1a7da00d30edb6e617e8dcf”
    },

    Rank math version info:

    * @wordpress-plugin
    * Plugin Name: Rank Math SEO
    * Version: 1.0.35.3

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Rank Math

    (@rankmath)

    Hello @igroykt

    Thank you for contacting the support and sorry for any inconvenience that might have been caused due to that.

    Can you please tell us where did you see this error and how to reproduce it?

    Looking forward to helping you.

    Thread Starter igroykt

    (@igroykt)

    Hi @rankmath
    Thank for the reply. I made some investigation and looks like rank math conflicting with my plugin goauth that uses google API client to login user. Problem appears when plugin try to retrieve user information:

    $google_oauthV2 = new Google_Service_Oauth2($this->client);
    $this->profile = $google_oauthV2->userinfo->get();

    This return object “Google_Service_Oauth2_Userinfoplus” that contains correct information about user profile, but somehow it triggers error in rank math.
    Can you confirm that rank math compatible with mongolog…oh….my plugin has monolog 2:

    firebase/php-jwt v5.0.0 A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.
    google/apiclient v2.4.0 Client library for Google APIs
    google/apiclient-services v0.121 Client library for Google APIs
    google/auth v1.6.1 Google Auth Library for PHP
    guzzlehttp/guzzle 6.4.1 Guzzle is a PHP HTTP client library
    guzzlehttp/promises v1.3.1 Guzzle promises library
    guzzlehttp/psr7 1.6.1 PSR-7 message implementation that also provides common utility methods
    monolog/monolog 2.0.1 Sends your logs to files, sockets, inboxes, databases and various web services
    phpseclib/phpseclib 2.0.23 PHP Secure Communications Library – Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.
    psr/cache 1.0.1 Common interface for caching libraries
    psr/http-message 1.0.1 Common interface for HTTP messages
    psr/log 1.1.2 Common interface for logging libraries
    ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
    sonata-project/google-authenticator 2.2.0 Library to integrate Google Authenticator into a PHP project

    Looks like that causing problem.

    Thread Starter igroykt

    (@igroykt)

    Thread Starter igroykt

    (@igroykt)

    Imposter solved a problem with monolog, but broke guzzlehttp. So I decided just downgrade monolog. It looks like all other packages compatible with monolog 1.25.1.

    Plugin Author Rank Math

    (@rankmath)

    Hello @igroykt

    Can you please confirm if the following option is turned off on your installation?
    https://i.rankmath.com/6ahW1J

    We have Rollbar in the plugin which utilizes Monolog and that might be creating a conflict.

    Looking forward to hearing from you. Thank you.

    Thread Starter igroykt

    (@igroykt)

    Hi @rankmath
    I turned this option off right now and it helped 🙂
    I confirm that “Usage tracking” option causes an error.

    Plugin Author Rank Math

    (@rankmath)

    Hello @igroykt

    Glad that helped. We will see how we can improve that compatibility down the line.

    Please let us know if there’s anything else we can help you with. We would be more than happy to assist.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘monolog error’ is closed to new replies.