Experiencing this problem with js file contrib/views_slideshow_thumbnailhover/views_slideshow.js

"viewsSlideshowThumbnailHover":{"#views_slideshow_thumbnailhover_main_Gallery-block_2":{"num_divs":2,"teasers_last":1,"id_prefix":"#views_slideshow_thumbnailhover_main_","div_prefix":"#views_slideshow_thumbnailhover_div_","vss_id":"Gallery-block_2","view_id":"Gallery-block_2","timeout":"5000","sort":1,"effect":"fade","speed":"300","start_paused":0,"fade_value":0.25,"hover_breakout":"teaser","hover":"hover","main_fields":{"field_gallery_image_fid":"field_gallery_image_fid","field_gallery_image_fid_1":0},"breakout_fields":{"field_gallery_image_fid_1":"field_gallery_image_fid_1","field_gallery_image_fid":0},"delay":"0","fixed_height":"0","random":"0","pause":"1","pause_on_click":"0","remember_slide":0,"remember_slide_days":"1","pager_event":"mouseover","controls":"0","image_count":"0","sync":"2","advanced":"cleartypeNoBg: true","ie":{"cleartype":"true","cleartypenobg":"false"},"nowrap":"0"}}});
//--><!]]>

The container for the slideshow fields does not recieve the width and height. Reason seems to be that the settings.fixed_height is string "0" and not integer 0.
When I replace

if (settings.fixed_height == 0) {

by type-agnostic

if (settings.fixed_height === 0) {

Only then does the container have a width and height style.

But if I interpret http://drupal.org/node/304243 correctly, the problem is the saving of the form element fixed_height.
I do not have a live site to illustrate.

Comments

jummonk’s picture

Modification: I only have the main fields container with width and height when I remove the test on settings.fixed_height altogether:

//if (settings.fixed_height == 0) {
      //get the height of the current slide
      var $ht = $(this).height();
      //set the container's height to that of the current slide
      $(this).parent().animate({height: $ht});
//}

Of course like this, the setting 'Make the slide window height fit the largest slide: ' has no longer any meaning.

I should have mentioned the following too: the problem does not occur after page reload, which should not be necessary.

Thanks

redndahead’s picture

Title: Slideshow container of main fields does not receive height and width » Make sure all strings that should be numbers are set to numbers and all strings that should be booleans are set to booleans

Sorry for the long delay. I am going to rename this issue to what I think the real problem is and it is a more global thing. We need to make sure all numbers are set as numbers and all true/false are set as a real boolean instead of a string.

We need to do this on the php side before we pass to js settings.

redndahead’s picture

Status: Active » Needs review
StatusFileSize
new29.04 KB

Here is the patch for 3.x

redndahead’s picture

StatusFileSize
new3.16 KB
new32.23 KB

Here is the one for v2 and also another one for v3 that adds fixes for singleframe/thumbnailhover

redndahead’s picture

Status: Needs review » Fixed

These patches have been committed. If someone could test the next dev release that would be great. I would like to tag a new release really soon.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.