Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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().
Comment | File | Size | Author |
---|---|---|---|
#1 | flexslider_views_slideshow_add_js-1823624.patch | 684 bytes | quicksketch |
Comments
Comment #1
quicksketchPatch.
Comment #2
quicksketchThe cause of the error is the first lines in flexslider.load.js:
The variable
settings.flexslider.instances
isn't defined if no normal Flexsliders are on the page.Comment #3
torpy CreditAttribution: torpy commentedConfirmed, the patch above fixes this issue.
Comment #4
acrollet CreditAttribution: acrollet commentedThis fixed an incompatibility with http://drupal.org/project/views_infinite_scroll
Comment #5
minorOffense CreditAttribution: minorOffense commented