Support » Plugin: YITH WooCommerce Wishlist » JS error

  • Resolved arunschandran


    I am getting a JS error like this

    jquery.yith-wcwl.js?ver=3.0.9:1 Uncaught TypeError: Cannot read property 'contains' of undefined
        at jquery.yith-wcwl.js?ver=3.0.9:1
        at NodeList.forEach (<anonymous>)
        at MutationObserver.observe.childList (jquery.yith-wcwl.js?ver=3.0.9:1)

    I saw many people mentioning the same error, but I couldn’t find the solution in any of those threads.

    I tried disabling all plugins except Woocommerece and YITH WooCommerce Wishlist and changing the theme. Then I found out I can see this error only if “Google tag manager” is present. I can’t disable Tag manager. Can you please help me to fix this error?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author YITHEMES



    I cannot replicate the issue on a vanilla installation of YITH WooCommerce Wishlist

    Do you experience this problem with a specific WordPress plugin for Google Tag Manager (in this case, please, provide us a link to the plugin), or whenever you add custom js code needed to enable tag manager on your site?



    I used 3 different tag manager plugins. I didn’t add any custom code to enable tag manager. If you share email address i will send the site link

    Plugin Author YITHEMES


    Unfortunately, due to forum regulations, I cannot ask you for informations over private email

    Anyway, you can enter url in dedicated input here on the forum: only logged users will be able to see it

    This is the link of the site

    Plugin Author YITHEMES


    Hi there

    I visited your shop, navigated to many product pages, added a couple of items to the wishlists and visited the wishlist itself, but I was never able to trigger a js error in console
    I couldn’t replicate the issue that you reported

    Could you please explain me how to proceed in order to see the error?

    The error is not showing all the time. Open the website and enable developer tool and view console. And try to navigate through different pages. You will see it. If you don’t see it, try in incognito. Here is the screenshot of the error

    I am having the same issue with one of my sites, the issue is only seen on the console when you are logged in, that’s the reason why the author is not able to see the issue. I too am looking for the solution. Hope to get a solution soon.

    Plugin Author YITHEMES


    Hi again guys

    I’m still unable to reproduce the issue on my end, but I anyway added an additional check in plugin js code, in order to hopefully solve the problem

    Do you mind downloading attached files, and upload them on your server as follows? -> wp-content/plugins/yith-woocommerce-wishlist/assets/js/ -> wp-content/plugins/yith-woocommerce-wishlist/assets/js/unminified/

    Please, make sure to have a backup copy of the plugin ready to be deployed, just in case something is wrong with the beta code that I sent you

    Please, let me know if this fix the issue

    Worked Perfectly thanks 🙂

    Hi @yithemes , I had the exact same issue, tried replacing the files according to your instructions and the error is gone. Do you plan on including this fix into a plugin update soon?

    Thank you!

    Plugin Author YITHEMES


    Hi guys

    @mandipluitel Great news!
    @andreeapomirleanu Sure, this fix will be released with next version of the plugin, hopefully in the early days of next week
    @arunschandran Do you have some news for us? Did the fix solved th issue? I’ll wait for your answer to set this topic as solved

    Sorry for the delayed response. It worked perfectly. Thank you so much

    I am having the same error. I see that you updated the plugin 4 days ago and that you deleted the files above so I am assuming you think that the problem is fixed but it isn’t. I have flushed all of my caches multiple times and the error is still consistently present.

    I also use the Google Tag Manager plugin. I read above that this may be the problem area.

    • This reply was modified 2 months, 1 week ago by natip100.


    I fixed the error two weeks ago with these new files, and now it’s happening again to me, too.



    Yeah, idk why they would fix the problem and then it comes right back. Follow my separate topic started here. They re-posted the files there.

Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.