Prerequisites
Describe the bug and add attachments
Environment
PrestaShop 9.1.4
Hummingbird 2.0.0
Hummingbird 2.1 Beta
Stripe Official 3.7.3
PHP 8.x
Summary
The Stripe Official Payment Element does not render on the checkout page when using the Hummingbird theme.
The same Stripe configuration works correctly with the Classic theme.
Steps to reproduce
Install PrestaShop 9.1.4.
Activate Hummingbird 2.x.
Install and configure Stripe Official 3.7.3.
Enable the embedded Payment Element checkout experience.
Go to checkout.
Select the Stripe payment method.
Expected behavior
Stripe Payment Element should be displayed inside the checkout payment section.
Actual Result
The payment option is displayed and can be selected, but the Stripe Payment Element never appears.
Browser console shows:
TypeError: Cannot read properties of null (reading 'insertAdjacentElement')
The following container remains empty:
Investigation
The Stripe module JavaScript contains the following selector logic:
const container =
document.querySelector('.payment-options')
|| document.querySelector('.payment__list');
Later it executes:
container.insertAdjacentElement(...)
With Hummingbird, neither .payment-options nor .payment__list exists in the checkout payment step.
Instead, the payment list container is rendered as:
As a result:
container === null
which triggers:
Cannot read properties of null (reading 'insertAdjacentElement')
preventing Stripe from mounting the Payment Element.
Root cause
In:
themes/hummingbird/templates/checkout/_partials/steps/payment.tpl
Hummingbird renders:
div class="payment-options__list"
while Stripe Official expects:
div class="payment-options"
or
div class="payment__list"
Tested workaround
Changing:
div class="payment-options__list"
to:
div class="payment-options payment-options__list"
immediately fixes the issue.
Add backward compatibility by including the existing selector expected by payment modules:
div class="payment-options payment-options__list"
or provide an equivalent compatibility layer so modules relying on .payment-options continue to function.
Additional notes
Issue reproduced on both Hummingbird 2.0.0 and 2.1 Beta.
Stripe.js loads correctly.
Stripe iframes are created.
The failure occurs when the module attempts to insert the payment form into the checkout DOM.
Classic theme does not exhibit this problem.
PrestaShop version where the bug happens
9.1.4
Theme version where the bug happens
Hummingbird 2.0 & 2.1
PHP version(s) where the bug happened
8.3
Your company or customer's name goes here (if applicable).
No response
Prerequisites
Describe the bug and add attachments
Environment
PrestaShop 9.1.4
Hummingbird 2.0.0
Hummingbird 2.1 Beta
Stripe Official 3.7.3
PHP 8.x
Summary
The Stripe Official Payment Element does not render on the checkout page when using the Hummingbird theme.
The same Stripe configuration works correctly with the Classic theme.
Steps to reproduce
Install PrestaShop 9.1.4.
Activate Hummingbird 2.x.
Install and configure Stripe Official 3.7.3.
Enable the embedded Payment Element checkout experience.
Go to checkout.
Select the Stripe payment method.
Expected behavior
Stripe Payment Element should be displayed inside the checkout payment section.
Actual Result
The payment option is displayed and can be selected, but the Stripe Payment Element never appears.
Browser console shows:
TypeError: Cannot read properties of null (reading 'insertAdjacentElement')
The following container remains empty:
Investigation
The Stripe module JavaScript contains the following selector logic:
const container =
document.querySelector('.payment-options')
|| document.querySelector('.payment__list');
Later it executes:
container.insertAdjacentElement(...)
With Hummingbird, neither .payment-options nor .payment__list exists in the checkout payment step.
Instead, the payment list container is rendered as:
As a result:
container === null
which triggers:
Cannot read properties of null (reading 'insertAdjacentElement')
preventing Stripe from mounting the Payment Element.
Root cause
In:
themes/hummingbird/templates/checkout/_partials/steps/payment.tpl
Hummingbird renders:
div class="payment-options__list"
while Stripe Official expects:
div class="payment-options"
or
div class="payment__list"
Tested workaround
Changing:
div class="payment-options__list"
to:
div class="payment-options payment-options__list"
immediately fixes the issue.
Add backward compatibility by including the existing selector expected by payment modules:
div class="payment-options payment-options__list"
or provide an equivalent compatibility layer so modules relying on .payment-options continue to function.
Additional notes
Issue reproduced on both Hummingbird 2.0.0 and 2.1 Beta.
Stripe.js loads correctly.
Stripe iframes are created.
The failure occurs when the module attempts to insert the payment form into the checkout DOM.
Classic theme does not exhibit this problem.
PrestaShop version where the bug happens
9.1.4
Theme version where the bug happens
Hummingbird 2.0 & 2.1
PHP version(s) where the bug happened
8.3
Your company or customer's name goes here (if applicable).
No response