Closed (works as designed)
Project:
Field Slideshow
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Feb 2012 at 17:27 UTC
Updated:
20 Nov 2012 at 06:13 UTC
If you have a sliderfield showing that only has one image in it, there is a js error '[cycle] terminating; too few slides: 1'. This casuses other js on the page to break.
Comments
Comment #1
jdanthinne commentedHi, I've just changed my script, so it doesn't launch Cycle if there's only 1 slide.
Can you test latest DEV (or use http://drupalcode.org/project/field_slideshow.git/patch/89469d8) and tell me if it works for you?
Comment #2
idflood commentedI've checked the code and did my best to reproduce the issue. This looks like it is completely fixed so I'm closing this. You are more than welcome to reopen the issue if it's not the case.
Comment #3
ekes commentedHi, sorry to re-open but I've just been experiencing this issue. Pushed up to 89469d8 and tried @head too. Still experiencing it with single items.
Setting breakpoints I notice the error is thrown before num_slides is set or checked. The error is in
log() {}of jquery.cycle atconsole.log('[cycle] ' + Array.prototype.join.call(arguments,' '));. I'm not yet sure where this is being called from.Comment #4
idflood commentedSorry, but I can't reproduce. The log function in jquery.cycle simply check if the console is available before using it. It's purpose is to avoid having errors like console is undefined in internet explorer and other browsers where this is not available.
Can you give more details about the error beeing thrown without setting breakpoints (message + filename + line number + short backtrace if possible) ? Or maybe you can try with the dev version from 2012-Apr-17 or later, I'm unable to reproduce with this version.
Comment #5
extatic commentedThe solution for me was to define span tag for Field Style settings -> "Customize field HTML" option and deselect checkbox "Multiple field settings" -> "Display all values in the same row". After these actions slideshow cycle works fine.
Comment #6
idflood commented@Extatic: what module are you using to have these settings?
Comment #7
marcelodornelas commentedI was having a similar problem with 2 images. It was actually my fault. I had to untick 'Group multiple values' on field settings. I'm using views 3.
Group multiple values
'If unchecked, each item in the field will create a new row, which may appear to cause duplicates. This setting is not compatible with click-sorting in table displays.'
Comment #8
sardbaba commentedSame issue here but with views_slideshow with cycle in a field of type image with unlimited number of values and multiupload widget type.
http://drupal.org/comment/reply/1426186/6588666#comment-6588666 worked for me.
Comment #9
ewyatt commentedThanks!
I was also having the same issue and http://drupal.org/node/1426186#comment-6383218 worked for me also.
Comment #10
idflood commentedThanks all. I've added the workaround at the end of the documentation page: http://drupal.org/node/1495622
I'm closing this issue since it seems to be "fixed", but feel free to reopen it if it's not the case.