Wishlist Sharing and other functions don’t work when logged in

We have recently discovered an issue on few stores. If the customer is logged in, the features of Wishlist page doesn’t work. These include Share Wishlist, Add to Cart, Remove etc. However if the customer is not logged in, no such issue is faced.

If you open the JS console in the Developer Tools, you may find the error message Uncaught TypeError: this.$backdrop.one(…).emulateTransitionEnd is not a function

It has got a simple fix.

  1. Open layout/theme.liquid
  2. Search for “owl” or “owlcarousel”. You may find any one of the following lines of code.
<script src="{{ 'owl.carousel.min.js' | asset_url }}" defer="defer"></script>
{{ 'owlcarousel.js' | asset_url | script_tag }}

3. Wrap the above code in {% if template %}… {% endif %} conditional statement. For e.g.

{% if template %}
  <script src="{{ 'owl.carousel.min.js' | asset_url }}" defer="defer"></script>
{% endif %}
{% if template %}
{{ 'owlcarousel.js' | asset_url | script_tag }}
{% endif %}

4. It ensures that the owl script is not loaded on the wishlist page. It won’t impact any other page of your store

Leave a Reply

Your email address will not be published.