Skip to main content

#206 error with stripeco.min.js

Posted in ‘Stripe Checkout for Phoca Cart’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information (available for public)

PHP version
8.3
Phoca Cart version
n/a
Stripe Checkout for Phoca Cart version
5.2.2

Latest post by b2z on Tuesday, 25 November 2025 22:01 EET

mnixson
At dev.truth-attack.com I add a product to the shopping cart and proceed to checkout. When I confirm the order it kicks me back to the home page and the only error I can find is that my Brave console reports as follows:

stripeco.min.js?b138b0:1 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')
at HTMLDocument. (stripeco.min.js?b138b0:1:879)
*****
According to ChatGPT this error means that stripeco.min.js is trying to attach an event listener to an element that does not exist in the DOM at the time the script runs.

This is not a generic PHP/Joomla error — it directly points to the NorNext Stripe Checkout plugin (PCP - Stripe Checkout for Phoca Cart).

The script expects certain DOM elements to exist (usually buttons or forms generated by Phoca Cart during checkout). When the element is missing, document.getElementById(...) returns null, and .addEventListener() throws.
*****
This error originally occurred in the root of this domain (truth-attack.com) so I did a complete new install in a subdomain (dev.)

The shopping cart can be accessed at https://dev.truth-attack.com/index.php/shop-truth-attack and the shopping cart is in sandbox mode for now.

Phoca Cart 5.2.2 as well as Pcp - Stripe Checkout for Phoca Cart ver 2.2.2 are the correct compatible versions. The Phoca vendor suggested six months ago that the template (RocketTheme) was the cause of the problem which is why I installed a Joomlead template on this website. I conclude that the tempplate cannot be the issue. Can you determine what is?

sulpher
Hi Michael,
Please try to reproduce this issue under the default Cassiopeia template to make sure the problem is related to the template.
1. Proceed to the checkout page under existing template to avoid making new modules.
2. Assign template to Cassiopeia
3. Reload the checkout page on the front-end and make test payment


This approach will help you to make sure is it the problem of the template or not.

b2z

Or set redirect timeout to 0 in the plugin settings.

Redirect timeout (seconds) - redirect timeout to Stripe checkout page. Set 0 for instant redirect.

Kind regards,

Dmitrijs

Support information

Support hours: You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+3), but not limited. Our staff is pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days.


Our time: / Your time:

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. We also ask you to remove temporary credentials at your site after the problem is resolved. Thank you.

Support of free extensions is not provided on this forum. Please submit your questions or report issues via Github tracker. See link on the product page.