I have placed an instance of galleryformatter into a jqueryUI tab and get the following error.

Uncaught RangeError: Invalid array length on line 12 of infiniteCarousel.js
This error results in no transitions, no arrows over the image and no gallery thumb forward or back buttons.

any thoughts?

running jquery update, and using a responsive theme called Sirate by ThemeBrain which uses the module response.js

Comments

navijo’s picture

Hi, I've solved it by adding

  if(visible===0){
              visible = 1;
          }

before

    if (($items.length % visible) != 0) {
              $slider.append(repeat('<li class="empty" />', visible - ($items.length % visible)));
              $items = $slider.find('> li');
          }

in line 29 of infiniteCarousel.js

Hope it helps!

kscheirer’s picture

Status: Active » Closed (duplicate)

I think this is a dupe of #2044143: Math.ceil should be floor on infiniteCarousel

Using floor instead of ceil should round properly, and then you shouldn't get array out of range errors. Please reopen this issue if that's not the case.

kscheirer’s picture

Issue summary: View changes

forgot some info