• Resolved SamAshford

    (@samashford)


    Hi there,

    My web address is https://www.timothyperkins.co.uk
    I am using the theme Blanco.
    Plugins… Woo Commerce and Layer Slider WP
    WordPress version 3.9

    I updated WordPress to version 3.9 this morning and it now looks like JavaScript isn’t working… On the home page there was a scrolling image using the Layer Slider WP. The slider is still there in Layer Slider but on the home page there is a large white space where the slider was previously.

    And on the contact page there was a live Google map. This is now blank and shows the message “Enable your JavaScript!

    I have tried visiting my website from multiple computers that this website worked on before the update and they are doing the same.

    Please help

Viewing 12 replies - 1 through 12 (of 12 total)
  • It is your theme. It is throwing a javascript error:

    Uncaught exception: TypeError: 'jQuery(window).smartresize' is not a function
    
    Error thrown at line 285, column 1 in <anonymous function>() in https://www.timothyperkins.co.uk/wp-content/themes/blanco/js/script.js?ver=3.9:
        jQuery(window).smartresize(function() {
    called via Function.prototype.apply() from line 1272, column 5 in <anonymous function: n.Callbacks>(l) in https://www.timothyperkins.co.uk/wp-includes/js/jquery/jquery.js?ver=1.11.0:
        if (h[f].apply(l[0], l[1]) === !1 && a.stopOnFalse)
    called from line 1317, column 5 in <anonymous function: fireWith>(a, c) in https://www.timothyperkins.co.uk/wp-includes/js/jquery/jquery.js?ver=1.11.0:
        return !h || d && !i || (c = c || [], c = [a, c.slice ? c.slice() : c], b ? i.push(c) : j(c)), this
    called from line 1398, column 4 in <anonymous function: ready>(a) in https://www.timothyperkins.co.uk/wp-includes/js/jquery/jquery.js?ver=1.11.0:
        n.isReady = !0, a !== !0 && --n.readyWait > 0 || (I.resolveWith(z, [n]), n.fn.trigger && n(z).trigger("ready").off("ready"))
    called from line 1406, column 2 in K() in https://www.timothyperkins.co.uk/wp-includes/js/jquery/jquery.js?ver=1.11.0:
        (z.addEventListener || "load" === event.type || "complete" === z.readyState) && (J(), n.ready())

    You’ll need to contact the theme author.. looks to be ThemeForest??

    I found this thread by searching for “wordpress broke layerslider”

    Also using Blanco theme. Guess need to revert wordpress until Blanco updates.

    I’ve encountered a similar issue on https://airportrevenuenews.com, since the 3.9 update.

    The sliders in the NEWS FLASH and PUBLICATION sections slide left for a second, but then just jump back to their initial position, instead of rotating through.

    I’m not the best with jQuery or WordPress, but I looked around as good as I could and I can’t see what the problem is.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Hi jmanly3, do you know if those sliders are part of your theme or a plugin?

    Sliders are a plugin. That wasnt the only issue I found with my site though. It killed most javascript. I use Visual Composer for my faq section(lists faq titles, you click it and it expands) which no longer works. Also my woocommerce cart does not update when changing shipping options. Guess gotta wait for blanco to update.

    Andrew,

    I started with this company after the site was built (they outsourced it to India), so I’m still trying to figure out how/why they did things and the code is pretty messy. I’ve been digging around in the php files and this is what I’ve found:

    For the “Publication” section, it appears they have used the Carousel Horizontal Content Slider plugin, but instead of seeing that under “Plugins” in WP, I see it under settings and there isn’t much to do in there.

    For the “News Flash” section, they went with a jQuery bxSlider.

    Neither of these are really “plugins” (I don’t think) and everything was working just fine yesterday, before we updated.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Hmm doesn’t look like it’s going to be a simple fix, can you create a new thread to discuss it https://www.ads-software.com/support/forum/how-to-and-troubleshooting#postform

    Thanks

    Have the same problem please help

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    For the BLANCO theme, it’s been updated: https://themeforest.net/item/blanco-responsive-wordpress-wooecommerce-theme/2755246

    If you’re not using that theme, please make your own topic.

    Go to your host control panel and delete both Blanco and WP Slider and reinstall this will solve the problem.

    For anyone who does not want to update Blanco you can got to:

    wp-content/themes/blanco/js/script.js

    and add:

    (function($,sr){
    
      // debouncing function from John Hann
      // https://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
      var debounce = function (func, threshold, execAsap) {
          var timeout;
    
          return function debounced () {
              var obj = this, args = arguments;
              function delayed () {
                  if (!execAsap)
                      func.apply(obj, args);
                  timeout = null;
              };
    
              if (timeout)
                  clearTimeout(timeout);
              else if (execAsap)
                  func.apply(obj, args);
    
              timeout = setTimeout(delayed, threshold || 100);
          };
      }
    	// smartresize
    	jQuery.fn[sr] = function(fn){  return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
    
    })(jQuery,'smartresize');

    to line 353 and that should fix the problem.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘JavaScript broken after WordPress 3.9 update’ is closed to new replies.