1

After a seemingly successful 2.4.2 -> 2.4.3-p1 adventure I get 'no payment methods' on the checkout page. Most of the time the checkout page will hang at the page loading spinner until page refresh, but sometimes this doesn't happen.

We use Opayo as our payment gateway, extension provided by Magenest, latest version. Even 'Cash on delivery' as an enabled payment method does not show on the frontend. If I rollback to 2.4.2 the payment method is available.

The only JS error in the console is:

require.js:166 Uncaught Error: Script error for: Magento_ReCaptchaWebapiUi/js/webapiReCaptchaRegistry
http://requirejs.org/docs/errors.html#scripterror

which from what I have read doesn't break anything.

Any ideas?

For reference, this is the contents of app/design/frontend///Magento_Checkout/templates/cart/minicart.phtml:

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

/** @var $block \Magento\Checkout\Block\Cart\Sidebar */
?>

<div data-block="minicart" class="minicart-wrapper">
    <a class="action" href="<?= $block->escapeUrl($block->getShoppingCartUrl()) ?>"
    data-bind="scope: 'minicart_content'">
        <svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"><path d="M11.122 1.091h-8.94a.267.267 0 00-.077.018l-.22-.722A.545.545 0 001.364 0H.273A.273.273 0 000 .273v.545a.273.273 0 00.273.273H.96l1.7 5.6-.636.742A1.137 1.137 0 001.778 8.5a1.084 1.084 0 001.044.773h7.814A.273.273 0 0010.909 9v-.545a.273.273 0 00-.273-.273H2.822l.865-1.009a.541.541 0 00.054-.082h5.285a1.091 1.091 0 00.987-.627l1.9-4.044A.886.886 0 0012 2.046v-.077a.878.878 0 00-.878-.878z" /><circle cx="1.091" cy="1.091" r="1.091" transform="translate(2.182 9.818)" /><circle cx="1.091" cy="1.091" r="1.091" transform="translate(8.727 9.818)" /></svg>
        <span class="text"><?= $block->escapeHtml(__('My Cart')) ?></span>
        <span class="counter qty empty"
            data-bind="css: { empty: !!getCartParam('summary_count') == false && !isLoading() }, blockLoader: isLoading">
            <span class="counter-number"><!-- ko text: getCartParam('summary_count') --><!-- /ko --></span>
            <?php /*
                <span class="counter-label">
                    <!-- ko if: getCartParam('summary_count') -->
                        <!-- ko i18n: 'items' --><!-- /ko -->
                    <!-- /ko -->
                </span>
            */?>
        </span>
    </a>
    <?php if ($block->getIsNeedToDisplaySideBar()) :?>
        <div class="block block-minicart"
            data-role="dropdownDialog"
            data-mage-init='{"dropdownDialog":{
                "appendTo":"[data-block=minicart]",
                "triggerTarget":".showcart",
                "timeout": "2000",
                "closeOnMouseLeave": false,
                "closeOnEscape": true,
                "triggerClass":"active",
                "parentClass":"active",
                "buttons":[]}}'>
            <div id="minicart-content-wrapper" data-bind="scope: 'minicart_content'">
                <!-- ko template: getTemplate() --><!-- /ko -->
            </div>
            <?= $block->getChildHtml('minicart.addons') ?>
        </div>
    <?php else :?>
        <script>
            require(['jquery'], function ($) {
                $('a.action.showcart').click(function() {
                    $(document.body).trigger('processStart');
                });
            });
        </script>
    <?php endif ?>
    <script>
        window.checkout = <?= /* @noEscape */ $block->getSerializedConfig() ?>;
    </script>
    <script type="text/x-magento-init">
    {
        "[data-block='minicart']": {
            "Magento_Ui/js/core/app": <?= /* @noEscape */ $block->getJsLayout() ?>
        },
        "*": {
            "Magento_Ui/js/block-loader": "<?= $block->escapeJs(
                $block->escapeUrl($block->getViewFileUrl('images/loader-1.gif'))
            ) ?>"
        }
    }
    </script>
</div>

And just to confirm, this is what happens when switching to Luma theme:

switching to Luma makes no difference

Edit: So I fixed the problem. For some reason during the upgrade the following plugins were disabled: Magento_ReCaptchaStorePickup Magento_ReCaptchaWebapiApi Magento_ReCaptchaWebapiGraphQl Magento_ReCaptchaWebapiRest Magento_ReCaptchaWebapiUi

I re-enabled them and the checkout now works.

1 Answer 1

0

There is an issue with Recaptcha in magento 2.4.3 and 2.4.3-p1, not sure if your case is related to that issue or not. Due to magento 2.4.3-p3 released some months ago, and the Opayo module from Magenest compatible with magento 2.4.3, and 2.4.4, I suggest you upgrade your site to 2.4.3-p3 and check if that issue still persists.

If upgrading your site to 2.4.3-p3 does not resolve the issue, I'll continue help you to debug and fix the issue.

17
  • Thanks, I'll try that now and report back
    – eleventy
    Oct 12, 2022 at 10:52
  • I upgraded Magento to 2.4.3-p3 but the problem remains, plus I now get 'Invalid security or form key. Please refresh the page.' on every admin page.
    – eleventy
    Oct 12, 2022 at 11:39
  • for the 'Invalid security or form key. Please refresh the page.', you can apply one of the solutions here magento.stackexchange.com/questions/346695/… I think it will be more error lines in the console. Could you please share that?
    – Tu Van
    Oct 12, 2022 at 12:17
  • Refreshing the page doesn't clear the message and no errors in console for admin pages, just this: loader_old.js:205 Expected to start loader but did not find one in the dom _onAjaxSend @ loader_old.js:205. Trying solutions on link
    – eleventy
    Oct 12, 2022 at 13:08
  • you can ignore this (invalid security) notice, this issue was fixed in magento 2.4.4. I would like to know the console on the checkout page not in the admin, sorry for making you misunderstood.
    – Tu Van
    Oct 12, 2022 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.