• Resolved toto

    (@toto)


    Very bad error on jquery image lightbox and gallery

    Uncaught TypeError: e.indexOf is not a function
    jQuery 11
    initFlexslider /wp-content/plugins/woocommerce/assets/js/frontend/single-product.min.js:1
    e /wp-content/plugins/woocommerce/assets/js/frontend/single-product.min.js:1
    wc_product_gallery wp-content/plugins/woocommerce/assets/js/frontend/single-product.min.js:1
    <anonymous> /wp-content/plugins/woocommerce/assets/js/frontend/single-product.min.js:1
    jQuery 2
    <anonymous> /wp-content/plugins/woocommerce/assets/js/frontend/single-product.min.js:1

Viewing 7 replies - 1 through 7 (of 7 total)
  • hi , this isuue also was for me after update woocommerce to 6.1.0 .all pictures preview disabled (but can click on it) in product page gallery. its because conflict with wprocket plugin. downngrade woocommerce to 6.0 and it will be ok until wprocket or woocommerce developers solve this important isuue.

    • This reply was modified 4 years, 5 months ago by hassan.
    Mirko P.

    (@rainfallnixfig)

    Hi @toto,

    Sorry to hear about that error. As a first step, you will want to do a conflict test to see if the issue is caused by a plugin/theme conflict with WooCommerce.

    Here are the steps for doing a conflict test: https://docs.woocommerce.com/document/how-to-test-for-conflicts/.

    @sangshenas thank you for your contribution to the thread. If @toto has WP Rocket installed it could be a good idea to temporarily flush the cache and/or disable the plugin.

    Cheers.

    Thread Starter toto

    (@toto)

    Hi i test it on clean wordpress, no other plugins installed, clean blank theme.
    Latest WordPress version, php 8.0, default Jquery exist on theme.
    But after last WC update problem is displayed, before update no problem exist.

    Please give us fast solution all products has no images or galleries now on 2,3 different sites and servers. Its a bug!!!

    Thread Starter toto

    (@toto)

    I found the problem, on my theme has a code to remove jquery migrate for optimization proposes.

    I remove this code and all works now. But why this happen after last update?

    add_action( 'wp_default_scripts', 'twf_remove_jquery_migrate' );
    function twf_remove_jquery_migrate( $scripts ) {
      if ( ! is_admin() && isset( $scripts->registered['jquery'] ) ) {
        $script = $scripts->registered['jquery'];
        if ( $script->deps ) { // Check whether the script has any dependencies
          $script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) );
        }
      }
    }

    Had the same problem, in my case with Oxygen builder, fixed by going to
    Oxygen Settings > Bloat Eliminator > uncheck Disable jQuery Migrate > save

    Plugin Support Joash (a11n)

    (@joashrajin)

    Hi there 👋

    Please note that we have a Pull Request which has a fix created for this which will be included in the next update to WooCommerce. For more information, you can refer to this bug report.

    I hope that this helps 👍

    Just a heads-up, I’m going to mark this as resolved – if you have any further questions related to this issue, feel free to post on GitHub directly.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Gallery and image preview not working’ is closed to new replies.