• I got the error on page after I enabled the plugin.

    jquery-3.4.1.min.js?ver=5.2.3:2
    Uncaught TypeError: e.indexOf is not a function
    at k.fn.init.k.fn.load (jquery-3.4.1.min.js?ver=5.2.3:2)
    at (index):272
    k.fn.load @ jquery-3.4.1.min.js?ver=5.2.3:2
    (anonymous) @ (index):272

    jquery-3.4.1.min.js?ver=5.2.3:2
    Uncaught TypeError: e.indexOf is not a function
    at k.fn.init.k.fn.load (jquery-3.4.1.min.js?ver=5.2.3:2)
    at photoswipe.js?ver=5.2.3:1
    k.fn.load @ jquery-3.4.1.min.js?ver=5.2.3:2
    (anonymous) @ photoswipe.js?ver=5.2.3:1

    Thank you in advance.

    • This topic was modified 5 years, 2 months ago by thitinan.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter thitinan

    (@thitinan)

    In case anyone got the same problem, the modification below will prevent the error.

    woocommerce-embed-videos-to-product-image-gallery/woocommerce-embed-videos-product-image-gallery.php: 220

            jQuery(window).on('load', function(){
    

    js/woocommerce-embed-videos-to-product-image-gallery/js/photoswipe.js: 1, 2

    
     jQuery(window).on('load', function(){
          var height = jQuery('.woocommerce-product-gallery__wrapper div')[0].width+2;
    

    It might not br the best practice to modify the plugin tho, but for the moment, this can’t fix the error.

    Thread Starter thitinan

    (@thitinan)

    In case some other pages got a problem using width.

    
     jQuery(window).on('load', function(){
    	 if (jQuery('.woocommerce-product-gallery__wrapper div')[0]) {
    		var height = jQuery('.woocommerce-product-gallery__wrapper div')[0].width+2;
    		jQuery('iframe').attr('height',height);
    	 }
    });
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught TypeError: e.indexOf is not a function’ is closed to new replies.