Skip to content

JS error in console on checkout when recaptcha for checkout/placing order is not enabled #33741

Closed
@basvanpoppel

Description

@basvanpoppel

Preconditions (*)

  1. Magento 2.4.3
  2. 'Stores > Configuration > Security > Google reCAPTCHA Storefront > Storefront > Enable for Checkout/Placing Order' set to 'No' (that's the default config)

Steps to reproduce (*)

  1. Add a product to cart
  2. Go to checkout
  3. Open element inspector, see the JS error

Expected result (*)

  1. No JS errors on checkout
  2. Besides not wanting to run into errors, I wouldn't expect checkout to load any recaptcha JS when all the recaptcha options are not enabled.

Actual result (*)

  1. Error message from recaptcha JS:
knockout.js:3753 Uncaught TypeError: Unable to process binding "afterRender: function(){return renderReCaptcha() }"
Message: Cannot read property 'rendering' of undefined
    at UiClass.initCaptcha (reCaptcha.js:117)
    at UiClass.renderReCaptcha (reCaptcha.js:182)
    at afterRender (eval at createBindingsStringEvaluator (knockout.js:3221), <anonymous>:3:134)
    at init (after-render.js:17)
    at knockout.js:3730
    at Object.ignore (knockout.js:1563)
    at knockout.js:3729
    at Object.arrayForEach (knockout.js:168)
    at applyBindingsToNodeInternal (knockout.js:3715)
    at applyBindingsToNodeAndDescendantsInternal (knockout.js:3573)

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

ps. I think severity should be higher, because any dev working om checkout will spot this, and will be looking for a fix. (I first checked all of my modules, themes and 3rd party modules: it's time consuming.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: UI FrameworkPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.4.3Indicates original Magento version for the Issue report.Severity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions