Uploaded image for project: 'Red Hat 3scale API Management'
  1. Red Hat 3scale API Management
  2. THREESCALE-2783

Stripe elements card.mount('#card-element') fails

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • None
    • SaaS
    • System
    • 1
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • Not Started
    • +
    • 3scale 2019-06-03

    Description

      When using the

      {% stripe_form %}

      liquid drop, the form does not work correctly and the following error is reported in the console:

      Error: The selector you specified (#card-element) applies to no DOM elements that are currently on the page.
      Make sure the element exists on the page before calling mount(). v3:1:11502
          t https://js.stripe.com/v3/:1
          mount https://js.stripe.com/v3/:1
          ln https://js.stripe.com/v3/:1
          <anonymous> https://<example>.com/admin/account/stripe:265
      

      Upon further investigation it looks like the `#card-element` DOM element has `col-md-10` added in the id which makes the card.mount('#card-element') fail. It's unclear why this element has `col-md-10` but it comes back from 3scale that way. It's not added client side. See attached screenshot.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-spoole Shannon Poole
            Thomas Maas Thomas Maas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: