• Resolved audetcameron

    (@audetcameron)


    PHP Fatal error: Uncaught Error: Undefined class constant ‘Monolog\Utils::DEFAULT_JSON_FLAGS’
    wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:194

    PHP 7.4

    Plugin Version:1.3.9
    Wordpress Version: Version 6.0.2

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author alexacrm

    (@alexacrm)

    Hi @audetcameron

    do you have WP Rocket plugin by any chance installed? If you don’t have it, would you mind sending the list of your plugins and their versions to [email protected]?

    Cheers
    George

    Thread Starter audetcameron

    (@audetcameron)

    Hi George,
    I do have wp-rocket installed.

    • This reply was modified 2 years, 1 month ago by audetcameron.
    Plugin Author alexacrm

    (@alexacrm)

    That explains it. https://github.com/wp-media/wp-rocket/issues/5366 documents a small ****storm caused by wp rocket updating their monolog library to 2.x

    Long story short – WordPress does not handle these types of conflicts well, it was not very nice of WP Rocket to do it in the first place but we’re working on a patch that hopefully will get us compatibility.

    Plugin Author alexacrm

    (@alexacrm)

    @audetcameron

    Would it be possible to get the full stack when this error happens? We don’t see how possibly this constant can play any part

    Cheers
    George

    Thread Starter audetcameron

    (@audetcameron)

    Howdy, it only happens when I use a shortcode to display a form on page. I have turned off the plugin for now until I can investigate locally.

    Plugin Author alexacrm

    (@alexacrm)

    @audetcameron it’d be really helpful if you provided the shortcode and the stack trace as we can’t reproduce the problem.

    Note that shortcodes have been deprecated for a long time and are not forward-compatible. We recommend using twig codes instead. For example, instead of [msdyncrm_form] use [msdyncrm_twig]{% form ... %} construct.

    Thread Starter audetcameron

    (@audetcameron)

    If it helps, this site was using the old code and not the new twig shortcode.

    [msdyncrm_form default=”{ts_leadsourceorigin:XXXXXXXXX},{ts_utm_source:”test”},{ts_ utm_medium:none},{ts_ utm_campaign:none},{ts_ utm_term:none}” entity=”lead” name=”Web Contact Form” mode=”create” captcha=”true” message=”Thank you, we’ll be in touch soon!” redirect_url=”thank-you”]

    Plugin Author alexacrm

    (@alexacrm)

    @audetcameron can you try {% view %} twig instead? Also, do you have the php log related to the error? Stack trace would be really useful

    @alexacrm Do you have any updates on this? You had indicated you were working on a patch to hopefully get compatibility, but I haven’t seen any new releases of the plugin since that comment has been made.

    Plugin Author alexacrm

    (@alexacrm)

    @drahija

    We were waiting for @audetcameron to try non-deprecated syntax but haven’t heard back. So far we can’t work out the issue because the flag mentioned in the error simply does not exist in our code?!

    Are you getting the same error message? Are you using twig {% view %}?

    Yeah, we started running into issues with an integration of one of our customers. We don’t typically use the Dynamics 365 Integration plugin, so it’s really not something I’m too familiar with. In fact, it was our customer who setup the integration. The way they’re using it is on a Gravity Form using the Dynamics 365 Plugin feed to submit data into their system.

    After the WP Rocket update, the Dynamics 365 Plugin was no longer able to connect. The primary area we were seeing the issue was in the Dynamics 365 settings, it was showing “Not Connected” and after entering credentials and pressing the “Connect” button it would throw a fatal error. Here’s what we were able to pull from the logs. Note these logs are truncated and slightly modified to protect customer privacy and data structure. I can attempt to get the full stack trace if necessary, but it might take some time.

    An error of type E_ERROR was caused in line 194 of the file wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php. Error message: Uncaught Error: Undefined class constant ‘Monolog\Utils::DEFAULT_JSON_FLAGS’ in wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php:194

    Stack trace:

    #0 wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php(113): Monolog\Handler\AbstractHandler->getDefaultFormatter()
    #1 wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37): Monolog\Handler\AbstractHandler->getFormatter()
    #2 wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Logger.php(344): Monolog\Handler\AbstractProcessingHandler->handle()
    #3 wp-content/plugins/integration-dynamics/vendor/monolog/monolog/src/Monolog/Logger.php(754): Monolog\Logger->addRecord()
    #4 wp-content/plugins/integration-dynamics/src/Connection

    For the time being, we rolled WP Rocket back to to version 3.11.5, which was the release prior to the Monolog upgrade.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Uncaught Error: Undefined class constant ‘Monolog\Utils::DEFAULT_JSON_FLAGS’’ is closed to new replies.