Discussions

[modification here] Bug in kickstart with slideshow

when opening development tools / on IE or firefox (not chrome) , slideshow stops and console javascript shows :

Uncaught TypeError: Cannot call method 'getSlideCount' of undefined commerce_kickstart_slideshow.js

Ligne 25 Caractère 13 :
Drupal.behaviors.commerce_kickstartslideshow_custom.processSlide(currentIndex, slider.getSlideCount(), $slideElement);

I found this error because this slideshow seems to be in conflict with aggregator, blocks with js/jquery and some other modules (i didn't notice them, but have read about it on some other posts here and there)

Posted: Dec 14, 2013

Comments

corbin on December 15, 2013

in commerce_kickstart_slideshow.js :

-  var slider = $('.event-slider', context).bxSlider({
+ var slider = $('.event-slider', context); // slider is initialized
+  slider.bxSlider({
  onSlideBefore: function($slideElement, oldIndex, newIndex) {
   Drupal.behaviors.commerce_kickstartslideshow_custom.processSlide(newIndex, slider.getSlideCount(), $slideElement);
  }
});

thank you to forum.alsacreations.com / kustolovic

awasson on January 6, 2014

Yeah, I ran into a similar error when I updated to 7.x-11 but it may have originated in 7.x-10. In mine, the slideshow stopped working and in Firebug I found the TypeError slider undefined. I created an issue in the issues queue and attached a patch but I haven't heard back.

I'm still unsure if this is an issue or a problem specific to my particular site but my patch which looks the same as yours fixed it right up. I posted the issue here: https://drupal.org/node/2166213