buckaroo-it / Magento2_Hyva_Checkout

This repository contains the additional module to support Hyvä Checkout
2 stars 3 forks source link

BP-3191 Module loads too fast (Unexpected identifier) #8

Closed HyperC closed 9 months ago

HyperC commented 9 months ago

For some reason this module throws errors on our staging environment (production mode), during load:

image

Locally it does work fine. For some reason it doesn't have a window object in the after.phtml on line:

window.addEventListener('buckaroo-modal-show', (event) => {

harli91 commented 9 months ago

Hello @HyperC what version of the plugin are you using, also what version of hyva checkout? I am unable to reproduce this in our environment

HyperC commented 9 months ago

Hi @harli91 , I'm using the 1.0.0 version on this module (the only release) and the latest version of hyva checkout (1.1.8). The buckaroo/magento2 version I'm using is 1.46.1. I noticed on my local environment that if I switch to production mode, I also get the error. Have you also tried that?

Buckaroo-Rene commented 9 months ago

@HyperC , Thank you for your quick reply with the versions. We'll research this straight away and let you know when we found the cause and a solution for it.

harli91 commented 9 months ago

Hi @HyperC I've moved some things around, created branch https://github.com/buckaroo-it/Magento2_Hyva_Checkout/tree/move-js, swich to this branch and check if the errors still exists, thanks

HyperC commented 9 months ago

@harli91 Thanks! Your fix seems to do the trick. Will push it to our staging env now, but locally all works fine! :)

Buckaroo-Rene commented 9 months ago

@HyperC , Thank you for the confirmation for now. Please let us know if you encounter any other issues.

Buckaroo-Rene commented 9 months ago

@HyperC , We are currently testing our changes as well and we will be doing a new release when that is all done. Hopefully this will be this week and otherwise next week.

Buckaroo-Rene commented 9 months ago

@HyperC,

A bit quicker then expected, but we did a new release today. v1.1.0