• Resolved isvetlichniy

    (@isvetlichniy)


    After the recent update of the WooCommerce Stripe Gateway plugin, we’re experiencing a fatal error for atum-stock-manager-for-woocommerce.

    Fatal error: Declaration of Mpdf\Http\Request::getRequestTarget() must be compatible with Psr\Http\Message\RequestInterface::getRequestTarget(): string in?/wp-content/plugins/atum-stock-manager-for-woocommerce/vendor/mpdf/mpdf/src/Http/Request.php?on line?69

    So that’s the 3rd-party vendor error and probably it conflicts with other plugins using Mpdf\Http\Request class because of the same namespace.

    The version of the plugin is 1.9.32?

    Any idea how to solve this issue?
    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jose Andres Piera

    (@japiera)

    Hi @isvetlichniy ,

    Apologies for any inconvenience caused.

    I take for granted that you’re talking about this plugin, aren’t you?

    I checked that plugin’s code, and it doesn’t use mPdf, so the conflict may be caused by another recently updated plugin. Could you check this?

    To know which plugin is causing the conflict, you can disable/enable the recently updated plugins until the issue disappears.

    Best Regards,

    José Andrés

    Thread Starter isvetlichniy

    (@isvetlichniy)

    Thank you for the response.

    As you can see the issue isn’t in Mpdf itself but in fact that it’s getRequestTarget method isn’t compatible with Psr\Http\Message\RequestInterface.

    That probably happens because a lot of plugins are using various versions of Psr but with the same namespace, so you plugin is getting the wrong Psr\Http\Message\RequestInterface by that namespace. I believe the unique namespace prefix would solve this issue.

    Here is the list of our website’s plugins using the Psr\Http\Message\RequestInterface:

    • activecampaign-for-woocommerce
    • atum-stock-manager-for-woocommerce
    • google-listings-and-ads
    • ultimate-elementor
    • wc-shipstation-shipping-pro
    • wordpress-seo
    • wp-mail-smtp
    Plugin Author Jose Andres Piera

    (@japiera)

    Hi @isvetlichniy ,

    Any of them has been updated recently?

    To try to narrow down which plugin is causing the problem, would you be so kind as temporarily disable them one by one, and try to reproduce the error?

    Best Regards,

    José Andrés

    Thread Starter isvetlichniy

    (@isvetlichniy)

    HI @japiera

    We updated a lot of plugins, and it’s live site, I unfortunately can not disable them and test or downgrade.

    Any ideas what can be wrong? Are you sure all your libraries in “vendor” directory are latest version? I checked similar issues in google, it could be that different plugins use the same library but different versions.

    Let me know

    Plugin Author Jose Andres Piera

    (@japiera)

    Hi @isvetlichniy

    Indeed, I’m pretty sure that that is the problem. One plugin has a distinct mPdf version.

    But please note that we can’t support the thousands of existing third-party plugins that use that library. That’s why I’m asking you to identify the one causing the conflict.

    Don’t you have a staging site to test the updated plugins before going online? We highly recommend that to prevent issues like this one.

    If you identify the plugin, we’ll can try to fix the problem.

    Best Regards,

    José Andrés

    Plugin Author Jose Andres Piera

    (@japiera)

    Hi @isvetlichniy

    I’ve been taking a look deeper into the mPdf repository.

    The issue you’re experiencing comes from the psr/http library.

    The mPdf library requires the psr/http library v1.0 since March 2022. We included the latest published version on April 2023. The library version hasn’t changed since then.

    We think another plugin requires the psr/http library (and not the mPdf), and it has updated its dependencies to a higher version.

    Please note that even if you disable ATUM, the other plugins using mPdf may fail in any moment because they require the psr/http library 1.0 version.

    I suggest you to find the plugin that updated its psr/http dependencies.

    Hope this helps,

    José Andrés

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fatal error: Declaration of Mpdf\Http\Request::getRequestTarget()’ is closed to new replies.