FlexSlider icon indicating copy to clipboard operation
FlexSlider copied to clipboard

Maximum call stack exceeded when adding a slide

Open differentstudios opened this issue 7 years ago • 6 comments

I have FlexSlider 2.5 installed in my shopify theme and whenever I try to add a slide I get this error

Uncaught RangeError: Maximum call stack size exceeded

Here's the code I use to add a slide:

$('.product_slider').data('flexslider').addSlide($(li_html));

Here's the code I instantiate the flexslider with

  $('.product_slider').flexslider({
    startAt: parseInt($('.featured_image', $(this)).data('index'), 10),
    touch: true,
    pauseOnHover: true,
    controlNav: "thumbnails",
    directionNav: false,
    {% if settings.product_slideshow_animation == 'none' or settings.product_slideshow_animation == 'zoom' %}
    slideshow: false,
    {% else %}
    animation: "{{ settings.product_slideshow_animation }}",
    {% endif %}
    slideshowSpeed: {% if settings.slideshow_speed != blank %}{{ settings.slideshow_speed }}{% else %}10{% endif %}*1000,
    animationSpeed: 1
  });

I am not sure what's causing this error when adding a slide.

Edit: I also get the same error when I am trying to delete the file.

differentstudios avatar Jun 21 '17 14:06 differentstudios

How many slides are you trying to add?

jeffikus avatar Aug 01 '17 11:08 jeffikus

I have the same problem, add 1 or >1 slides and in any case throw the error. I managed to detect the problem and that is when I add this line { controlNav: "thumbnails", } in flexslider init. I need to use 'controlnav' with 'thumbnails' too but I do not know how to solve the problem.

jrealpe avatar Aug 13 '17 01:08 jrealpe

I also have this problem. Is like jrealpe said, deleting { controlNav: "thumbnails" } from flexslider the error disapear.

MateoLa avatar Nov 22 '17 20:11 MateoLa

I also have this problem, but i need the thumbnails for controlnav. Has anyone solved the problem?

mixian avatar Nov 30 '17 15:11 mixian

Having this problem as well. slider.addSlide() calls slider.update(), which calls methods.controlNav.update(), which calls slider.update(), which calls methods.controlNav.update(), etc...

kculmback avatar May 24 '19 03:05 kculmback

I also have this problem. Has anyone solved the problem?

MateiSorin avatar Oct 01 '20 07:10 MateiSorin