netresearch / dhl-module-ui

Module for providing the presentation layer within the Magento application for custom functionality
Open Software License 3.0
3 stars 0 forks source link

JS error on home page #2

Closed xpoback closed 4 years ago

xpoback commented 4 years ago

Prerequisites: Magento 2.3.5-p1 dhl/shipping-m2 1.1.0 (including Dhl_Ui 1.1.0)

Steps to reproduce:

  1. Load home page

Expected behavior: No errors.

Actual behavior: An error in the console:

raven.js:322 Uncaught TypeError: Cannot read property 'quoteData' of undefined
    at quote.js:33
    at Object.execCb (require.js:1650)
    at Object.context.execCb (resolver.js:145)
    at Module.check (require.js:866)
    at Module.enable (require.js:1143)
    at Module.init (require.js:774)
    at callGetModule (require.js:1170)
    at Object.completeLoad (require.js:1544)
    at HTMLScriptElement.onScriptLoad (require.js:1671)
    at HTMLScriptElement.i (raven.js:318)

Possible reason: Magento_Checkout/js/model/quote is called somewhere it is not supposed to be called i.e. Home Page.

mam08ixo commented 4 years ago

There is no attempt to load quote.js on my systems' home page. Can you provide more detailed information how the DHL modules are involved loading that file?

xpoback commented 4 years ago

It's possible, that we have a special home page element that calls for Dhl_Ui/js/model/checkout/storage which calls for quote.js. I will check/debug our code deeper. I will write back once it becomes clear whether the problem is project specific or not.

Here's the list of Dhl modules that are installed. In case you cannot reproduce the error in Vanilla 2.3.5, I'd say we close this issue since the problem is then most probably in the project.

vendor/
  dhl/
    module-carrier-paket
    module-carrier-paket-returns
    module-shipping-core
    module-ui
    module-unified-tracking
    sdk-api-bcs
    sdk-api-bcs-returns
    sdk-api-parcel-management
    sdk-api-unified-location-finder
    sdk-api-unified-tracking
ngolatka commented 4 years ago

Ok, I'm closing this for now.

@xpoback If you find this is indeed an issue in the DHL module, please reopen this issue and remove the label "not a bug".

parlt commented 3 years ago

This bug still open not clear why someone closed it, there is a wrong injection of dependencies. I have created a new ticket the bug is a showstopper https://github.com/netresearch/dhl-module-ui/issues/7