0

I don't even know how to explain this.

But the case is, in some pages if the user is logged in some of the features don't work.

For example in cart we have a tab that opens a closes with the form to apply discount code, but if the user is logged in it just does not work. Same goes to the other tabs, a block, and the button that should redirect to the checkout itself.

Idk what even to look for.

Edit:

Well I think is that the JQuery doesn't load when a user is logged in, in some pages it gives live date picker is not a function and only appears if the user is logged, so I bet on that, but what can cause the JQuery not to load (or load in time, the JQuery appears loaded in page) only if the user is logged in?

If user logged in

<div class="block discount" id="block-discount" data-mage-init="{&quot;collapsible&quot;:{&quot;openedState&quot;: &quot;active&quot;, &quot;saveState&quot;: false}}">

If not logged in

<div class="block discount" id="block-discount" data-collapsible="true" role="tablist">

Thanks :D

1 Answer 1

0

When your Magento site gives error that have no sense to you, it is often because the browser has stopped at one request and subsequent javascript requests do fail.

These errors can be due to customerData not getting loaded successfully.

  1. a new module may create the error and it can be useful to disable the module to confirm the root of the issue
  2. clear the local storage, cookie and cache in the browser can help if the code was change and the customerData should load
  3. if the above resolves nothing, it may be a good method to disable custom modules that were newly installed
  4. if it is not possible to disable module, it can be a solution to disable custom section source map from the custom di.xml.
6
  • Thanks! You might be right it would make sense! But it happens all over the pages and we only started working on the project recently and when we get to it it was already like this. There is some way that we can see if that's happening or at least some place to start looking? I have no ideia where to start from
    – Rui Silva
    May 13, 2020 at 11:29
  • I updated my answer May 13, 2020 at 11:38
  • Thanks! Sorry to bother even more checking the modules that exists It does not seem that any of them are loaded in all pages, so my bet it is in the theme in app/design/theme, but I can't disable that if I do I can't see the page I want, there is some xml to edit for the theme? Sorry I'm not used to work with themes yet
    – Rui Silva
    May 13, 2020 at 11:46
  • theme won't add source map as it needs to be done in di.xml so I would say theme is not the culprit for customerData. Now, if you're sure the theme is the culprit, that might mean you have another issue than customerData. Apologies as you may be back square one May 13, 2020 at 11:48
  • Broken reference: the 'checkout.cart.item.renderers.default.actions.move_to_wishlist' tries to reorder itself towards 'checkout.cart.item.renderers.default.actions.edit', but their parents are different: 'checkout.cart.item.renderers.mpgiftcard.actions' and 'checkout.cart.item.renderers.default.actions' respectively. [] [] It can broke that because of this, I checked system.log and when I load that page there's like 8 broken references
    – Rui Silva
    May 13, 2020 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.