• Resolved gsix

    (@gsix)


    On a multisite there is the following error after the latest update when visiting the subsite or the admin part of the subsite where this plugin is activated.

    This is solved by reverting to the previous plugin version.

    Uncaught Exception: Could not derive plugin path
    in /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/lib/payment-gateway/src/PaymentGatewayModule.php on line 171

    Call stack:

    1. Mollie\I\P\PaymentGatewayModule::getPluginFileUrlFromAbsolutePath()
      /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/lib/payment-gateway/src/PaymentGatewayModule.php:48
    2. Mollie\I\P\PaymentGatewayModule::Mollie\I\P\{closure}()
      /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/vendor/inpsyde/modularity/src/Container/ReadOnlyContainer.php:46
    3. Mollie\I\M\C\ReadOnlyContainer::get()
      /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/lib/payment-gateway/src/PaymentGatewayBlocks.php:55
    4. Mollie\I\P\PaymentGatewayBlocks::get_payment_method_script_handles()
      /bitnami/wordpress/wp-content/plugins/woocommerce/src/Blocks/Payments/PaymentMethodRegistry.php:45
    5. Automattic\W\B\P\PaymentMethodRegistry::get_all_active_payment_method_script_dependencies()
      /bitnami/wordpress/wp-content/plugins/woocommerce/src/Blocks/Payments/Api.php:133
    6. Automattic\W\B\P\Api::verify_payment_methods_dependencies()
      wp-includes/class-wp-hook.php:324
    7. WP_Hook::apply_filters()
      wp-includes/class-wp-hook.php:348
    8. WP_Hook::do_action()
      wp-includes/plugin.php:517
    9. do_action()
      wp-includes/script-loader.php:2251
    10. wp_print_head_scripts()
      wp-includes/class-wp-hook.php:324
    11. WP_Hook::apply_filters()
      wp-includes/class-wp-hook.php:348
    12. WP_Hook::do_action()
      wp-includes/plugin.php:517
    13. do_action()
      wp-includes/general-template.php:3192
    14. wp_head()
      /bitnami/wordpress/wp-content/themes/astra/header.php:31
    15. require_once('/bitnami/wordpress/w...mes/astra/header.php')
      wp-includes/template.php:810
    16. load_template()
      wp-includes/template.php:745
    17. locate_template()
      wp-includes/general-template.php:48
    18. get_header()
      /bitnami/wordpress/wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php:9
    19. include('/bitnami/wordpress/w...es/header-footer.php')
      wp-includes/template-loader.php:106
    20. require_once('/opt/bitnami/wordpre.../template-loader.php')
      wp-blog-header.php:19
    21. require('/opt/bitnami/wordpress/wp-blog-header.php')
      index.php:17

    Query Monitor

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Femi

    (@femiyb)

    Hello @gsix

    Thank you for reporting this issue. We’ve investigated the error you’re experiencing on your Bitnami WordPress multisite installation. We could not reproduce this, and it seems it might be related to your host environment.

    Could you please confirm if you have a site on a diiferent host where you could test for this?

    Could you also please share a copy of your site’s system status report? We can take a look at this to get more information about your site.

    You can share the system status report via: https://privatebin.syde.com/

    Regards,
    Femi.

    Thread Starter gsix

    (@gsix)

    Hi Femi,

    Thanks for your reply.

    This is on Azure AKS.
    Both on staging and development there is the same error after the update.

    Will test this soon on another setup since we are moving away from the Bitnami Helm chart.

    The system status report: https://privatebin.syde.com/?a46651cd27567970#6iVLG6BKpAHuMTm6GDFU3bibPCpGw3T9amiQnqmYxPfH

    • This reply was modified 5 months, 2 weeks ago by gsix.
    • This reply was modified 5 months, 2 weeks ago by gsix.
    Thread Starter gsix

    (@gsix)

    The error does not occur on a different setup without the Bitnami image.

    Hi, I got the same error:

    Technical Cause

    Inside PaymentGatewayModule::getPluginFileUrlFromAbsolutePath(), Mollie attempts to derive its plugin URL by matching an absolute filesystem path against paths returned by WordPress core functions:

    $absoluteFilePath = ‘/bitnami/wordpress/wp-content/plugins/…’;
    $pluginPath = WP_PLUGIN_DIR . ‘/’ . dirname(plugin_basename($plugin));
    // Typically resolves to ‘/opt/bitnami/wordpress/wp-content/plugins/…’

    Because Bitnami uses a symlink for wp-content, WordPress internally reports plugin paths starting with /opt/bitnami/wordpress/…, while the actual files reside under /bitnami/wordpress/….

    The string comparison in this line:

    if (0 === strpos($absoluteFilePath, $pluginPath))

    fails, and the method throws:

    throw new \RuntimeException(‘Could not derive plugin path’);

    Suggested Fix (Workaround)

    Users can fix the issue manually by aligning the paths in wp-config.php:

    define( ‘WP_PLUGIN_DIR’, ‘/bitnami/wordpress/wp-content/plugins’ );
    define( ‘WP_PLUGIN_URL’, ‘https://’ . $_SERVER[‘HTTP_HOST’] . ‘/wp-content/plugins’ );

    This forces WordPress (and thus Mollie) to use the same physical plugin path.

    suggested solution for Mollie:

    To make the plugin more robust on environments that use symlinks (like Bitnami, Docker, or Bedrock setups):

    1. Normalize symlinks before comparison, e.g.:$absoluteFilePath = realpath($absoluteFilePath); $pluginPath = realpath($pluginPath);
    2. Or use realpath() or wp_normalize_path() consistently before strpos().
    Thread Starter gsix

    (@gsix)

    Thanks for the explanation!

    Would be nice if Mollie fixes this, like you suggest, since we have not experienced this issue with any other plugin.

    Plugin Support Femi

    (@femiyb)

    Hello @gsix @lusensio

    I have forwarded this to the developers, and they are currently looking into it.

    I will let you know as soon as there is an update.

    Regards,
    Femi.

    figment

    (@joldeski)

    We are facing same issue after an update the site crashed with critical error.

    [Thu Nov 13 08:34:49.746011 2025] Got error ‘PHP message: PHP Fatal error: Uncaught RuntimeException: Could not derive plugin path in /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/lib/payment-gateway/src/PaymentGatewayModule.php:171\nStack trace:\n#0 /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/lib/payment-gateway/src/PaymentGatewayModule.php(48): Mollie\Inpsyde\PaymentGateway\PaymentGatewayModule->getPluginFileUrlFromAbsolutePath()\n#1 /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/vendor/inpsyde/modularity/src/Container/ReadOnlyContainer.php(46): Mollie\Inpsyde\PaymentGateway\PaymentGatewayModule->Mollie\Inpsyde\PaymentGateway\{closure}()\n#2 /bitnami/wordpress/wp-content/plugins/mollie-payments-for-woocommerce/lib/payment-gateway/src/PaymentGatewayBlocks.php(55): Mollie\Inpsyde\Modularity\Container\ReadOnlyContainer->get()\n#3 /bitnami/wordpress/wp-content/plugins/woocommerce/src/Blocks/Payments/Integrations/AbstractPaymentMethodType.php(70): Mollie\Inpsyde\PaymentGateway\Payment…’, referer: https://www.begener.de/wp-admin/edit.php?post_type=page

    We fixed it by adding define( ‘WP_PLUGIN_DIR’, ‘/bitnami/wordpress/wp-content/plugins’ ); in wp-config, hoping it won’t crash something else

    xorinzor

    (@xorinzor)

    Same issue, created a github issue about it: https://github.com/mollie/WooCommerce/issues/1123

    @figment was correct in his solution, though I would rather then hardcode it make use of a PHP constant instead for future prooving (in case you ever decide to move away from bitnami).
    define( 'WP_PLUGIN_DIR', __DIR__ . '/wp-content/plugins' );

    Plugin Support Femi

    (@femiyb)

    Hello all

    I just want to send a follow up here that we are currently looking into this.

    I will let you know as soon as there is an update.

    Thanks.

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hi @gsix , @xorinzor , @joldeski and @lusensio
    This issue should be resolved with the current beta release (8.1.4-beta) and will be included in the stable release planned for early next week. Feel free to test the beta and share any feedback. Thanks for reporting this!

    Plugin Support Syde Joost

    (@joostvandevijver)

    Hello,

    Since we haven’t heard back from you, we’ll assume the issue was resolved with the 8.1.4 release and close this engagement. If you’re still experiencing any issues, please open a new thread so we can take another look.

    Best regards, Joost

    Thread Starter gsix

    (@gsix)

    Hi, can confirm the issue is solved with the latest update. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.