Prevent multiple form submission on Review pane

Created on 12 March 2024, 6 months ago

Describe your bug or feature request.

We have several payment provider some offsite and onsite gateways and order number generation active.
We noticed that X numbers were generated for the same order and X receipts were send to our customers.
I know there were many attempts to fix this stuff and so far it works quite good but not when the user hits the Pay button several times in a row like a click burst on this button.

If a bug, provide steps to reproduce it from a clean install.

🐛 Bug report
Status

Closed: won't fix

Version

2.0

Component

Checkout

Created by

🇩🇪Germany DiDebru

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @DiDebru
  • Merge request !238Attach drupal.form library. → (Open) created by DiDebru
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.0 & MySQL 5.7
    last update 6 months ago
    793 pass
  • Status changed to Closed: won't fix 6 months ago
  • 🇮🇱Israel jsacksick

    We already include the drupal form library.

    CheckoutFlowBase::buildForm() has the following code:
    $form['#attached']['library'][] = 'commerce_checkout/form';

    And the checkout form library has core/drupal.form as a dependency.

    form:
      version: VERSION
      css:
        theme:
          css/commerce_checkout.form.css: {}
      dependencies:
        - core/drupal.form
    
  • 🇩🇪Germany DiDebru

    Ok strange because it didn't work.
    But it did after I added the library.

  • 🇩🇪Germany DiDebru

    I can see that the complete form has the library attached but the pane form does not.

    Before I added the line and have xdebug on multiple instances spin up.

    After I added the line only 1 spin up.

    So yeah believe it or not this should be added also to pane forms.

Production build 0.71.5 2024