• We are running into a fatal error on checkout…
    It”s been running fine for months, heck years..

    Any idea, please?

    [Tue Jul 20 11:13:09.181294 2021] [lsapi:error] [pid 6091:tid 140314509412096] [client 185.10.234.222:45149] [host e.kwalisites.nl] Backend fatal error: PHP Fatal error: Uncaught Error: Undefined class constant ‘Monolog\\Utils::DEFAULT_JSON_FLAGS’ in /home/u112641p108819/domains/e.kwalisites.nl/public_html/wp-content/plugins/woocommerce-eu-vat-assistant/src/embedded-framework/wc-aelia-foundation-classes-embedded/src/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:194\nStack trace:\n#0 /home/u112641p108819/domains/e.kwalisites.nl/public_html/wp-content/plugins/woocommerce-eu-vat-assistant/src/embedded-framework/wc-aelia-foundation-classes-embedded/src/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(113): Monolog\\Handler\\AbstractHandler->getDefaultFormatter()\n#1 /home/u112641p108819/domains/e.kwalisites.nl/public_html/wp-content/plugins/woocommerce-eu-vat-assistant/src/embedded-framework/wc-aelia-foundation-classes-embedded/src/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\\Handler\\AbstractHandler->getFormatter()\n#2 /home/u112641p108819/domains/e.kwalisites.nl/public_html/wp-content/plugins/woocommerce-eu-vat-ass in /home/u112641p108819/domains/e.kwalisites.nl/public_html/wp-content/plugins/woocommerce-eu-vat-assistant/src/embedded-framework/wc-aelia-foundation-classes-embedded/src/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php on line 194\n, referer: https://e.kwalisites.nl/winkel/servicepakket-kwalisite-standaard-1-0-maandbetaling/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Diego

    (@daigo75)

    The fatal error occurs because there is another plugin, on the site, that is loading an obsolete version of a library called Monolog, which our plugins also use. Some components of the obsolete library are being loaded first, and they are not compatible with the version used by our framework.

    To solve this issue, you will have to find what other element loads the obsolete version of the Monolog library and ask its authors to update it. To find the library, you can search the wp-content folder for a folder called monolog. This will indicate which component(s) include it. After finding the components, you can contact their authors and ask them to update the included Monolog version.

    For reference, our solutions use version 1.2x (we don’t use 2.x yet, due to some compatibility issues). Updating to the same version will fix the error.

    Thread Starter drksecret

    (@drksecret)

    Thanks for the quick reply…
    Slight issue, we have about 7 or 8 plugins using monolog. How do I find out which version library they use?

    Plugin Author Diego

    (@daigo75)

    There should be a file called CHANGELOG.md in the monolog folder of each instance. The number at the top of the list should be the installed version.

    Thread Starter drksecret

    (@drksecret)

    Ok, thanks for that. I have a few plugins that actually run a 2.1.1 version and one 1.5.2. Of two plugins I cannot find a changelog. Could it be that some run a higher version that cause tyour plugin to misbehave?

    Plugin Author Diego

    (@daigo75)

    I would exclude an issue with a higher version, as the error is the following:
    PHP Fatal error: Uncaught Error: Undefined class constant 'Monolog\\Utils::DEFAULT_JSON_FLAGS'

    This error occurs with older versions of Monolog, as Utils::DEFAULT_JSON_FLAGS was added at some point, but not removed in later versions.

    I would suspect that the issue is the plugin with Monolog 1.5. That version is very old (it’s from 2013), and definitely older than 1.2x (note, it’s 1.2x, as in 1.20, 1.21, 1.22, not 1.2.x).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal Error’ is closed to new replies.