PHP Fatal error: Declaration of Monolog\Logger::emergency

  • jaimem
    Participant
    1 month ago #53590

    WPSOLR PRO 24.0
    WordPress 6.7.2
    PHP 8.1.30

    PHP Fatal error: Declaration of Monolog\Logger::emergency(Stringable|string $message, array $context = []): void must be compatible with Psr\Log\LoggerInterface::emergency($message, array $context = []) in /var/www/audition/docs/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/monolog/monolog/src/Monolog/Logger.php on line 682

    This error message was signaled by the automated ‘Your site has experienced a fatal error’ message to the site admin. I’ve also seen it in the debug log while updating plugins, but not exclusively. I enabled debugging on the site for about 30 minutes and the site threw this error 77 times. The search function seems to be working and there hasn’t been any noticeable disruption to the site.

    Some (possibly related) strange behaviour:
    * WP is signaling that there is a new version of WPSOLR PRO availbe (on the plugins page as well as the updates page), but also says ‘Latest version already installed.’
    * I’ve had to click ‘Reactive this site license’ from the WPSOLR PRO ‘Click here to manage your license’ a few times in the past couple of weeks, even though the license hasn’t expired during this time (our license renews each August).

    thanks!

    jaimem
    Participant
    1 month ago #53591

    We’re also having issues with ajax requests – it seems like any request to wp-admin/admin-ajax.php results in a 500 error (for ex. uploading a file to the media library)

    when we experience these ajax errors, the above PHP Fatal error appears in the log

    wpsolr
    Keymaster
    1 month ago #53592

    It looks like the version of monolog brought with WPSOLR dependencies is incompatible with recent WordPress.

    Here is a workaround, until a fix is released:

    cd /plugins/wpsolr-pro/wpsolr-pro/wpsolr/core
    composer require monolog/monolog:^2.9

    (downgrade monolog to 2.x)

    jaimem
    Participant
    1 month ago #53599

    This solved the issues we were having, thank you!

    wpsolr
    Keymaster
    2 weeks, 5 days ago #54064

    Fix released with WPSOLR 24.0.1.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.