Right now Flexslider Views Slideshow uses flexslideshow_add() to add the Flexslider library to the page. However this means that assets/js/flexslider.load.js is also added to the page, which isn't needed because the Views Slideshow integration adds its own JS file.

Worse, if there aren't any "normal" Flexslider instances on the page, the flexslider.load.js file throws a JS error and all the JS on the page breaks. To fix this, it looks like we should just use drupal_add_library() instead of flexslider_add().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

quicksketch’s picture

The cause of the error is the first lines in flexslider.load.js:

Drupal.behaviors.flexslider = {
  attach: function(context, settings) {
    for (id in settings.flexslider.instances)

The variable settings.flexslider.instances isn't defined if no normal Flexsliders are on the page.

torpy’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed, the patch above fixes this issue.

acrollet’s picture

This fixed an incompatibility with http://drupal.org/project/views_infinite_scroll

minorOffense’s picture

Status: Reviewed & tested by the community » Closed (fixed)