Hello drupal,

I made a page with a Viewfield inside. Now, when I activate the output from the meta-tag module (for example the page-discription) nivo-slider stops sliding. The same Nivo Slider View works well as a block on the same page.
When I look at the html output I see the following differents:

Slider is working well:

jQuery.extend(Drupal.settings, { "basePath": "/", "admin_menu": { "margin_top": 1, "position_fixed": 1, "tweak_tabs": 1 }, "colorbox": { "transition": "elastic", "speed": 350, "opacity": "0.85", "slideshow": false, "slideshowAuto": false, "slideshowSpeed": 2500, "slideshowStart": "", "slideshowStop": "", "current": "{current} of {total}", "previous": "« Prev", "next": "Next »", "close": "Close", "overlayClose": true, "maxWidth": "100%", "maxHeight": "100%" }, "views_nivo_slider": { "views-nivo-slider-slider_gaestebuch-default": { "startSlide": 0, "effect": "fade", "slices": 1, "animSpeed": 1000, "pauseTime": 8000, "directionNav": true, "directionNavHide": true, "controlNav": false, "controlNavThumbs": false, "controlNavThumbsFromRel": false, "keyboardNav": false, "pauseOnHover": true, "manualAdvance": false, "captionOpacity": 0.8 }, "views-nivo-slider-slider_gaestebuch-block_1": { "startSlide": 0, "effect": "fade", "slices": 1, "animSpeed": 1000, "pauseTime": 8000, "directionNav": true, "directionNavHide": true, "controlNav": false, "controlNavThumbs": false, "controlNavThumbsFromRel": false, "keyboardNav": false, "pauseOnHover": true, "manualAdvance": false, "captionOpacity": 0.8 } } });

Slider stops sliding:

jQuery.extend(Drupal.settings, { "basePath": "/", "admin_menu": { "margin_top": 1, "position_fixed": 1, "tweak_tabs": 1 }, "colorbox": { "transition": "elastic", "speed": 350, "opacity": "0.85", "slideshow": false, "slideshowAuto": false, "slideshowSpeed": 2500, "slideshowStart": "", "slideshowStop": "", "current": "{current} of {total}", "previous": "« Prev", "next": "Next »", "close": "Close", "overlayClose": true, "maxWidth": "100%", "maxHeight": "100%" }, "views_nivo_slider": { "views-nivo-slider-slider_gaestebuch-default": { "startSlide": [ 0, 0 ], "effect": [ "fade", "fade" ], "slices": [ 1, 1 ], "animSpeed": [ 1000, 1000 ], "pauseTime": [ 8000, 8000 ], "directionNav": [ true, true ], "directionNavHide": [ true, true ], "controlNav": [ false, false ], "controlNavThumbs": [ false, false ], "controlNavThumbsFromRel": [ false, false ], "keyboardNav": [ false, false ], "pauseOnHover": [ true, true ], "manualAdvance": [ false, false ], "captionOpacity": [ 0.8, 0.8 ] }, "views-nivo-slider-slider_gaestebuch-block_1": { "startSlide": 0, "effect": "fade", "slices": 1, "animSpeed": 1000, "pauseTime": 8000, "directionNav": true, "directionNavHide": true, "controlNav": false, "controlNavThumbs": false, "controlNavThumbsFromRel": false, "keyboardNav": false, "pauseOnHover": true, "manualAdvance": false, "captionOpacity": 0.8 } } });

It seems that all slider parameters are double.
Could this be a problem with the viewfield-module?

Thanks in advance and sorry for my bad english ;-)

Comments

deltadancer’s picture

Category: bug » support
deltadancer’s picture

Status: Active » Closed (fixed)
esclapes’s picture

Version: 6.x-1.0 » 6.x-1.1
Category: support » bug
Status: Closed (fixed) » Active

Let me reopen this and mark as bug report (although it might not be a bug and/or it might not even be related to viewfield but Nivo Slider).

I came accross the same issue (using viewfield 1.1, though).

The initial report is accurate. When using viewfield to embed a Nivo Slider View, the configuration settings passed throught Drupal.settings is not well formed. Insted of being and array of key:value it becomes an array of key:[array_of_values] .

It seems to me that viewfield generates the view in such a way that triggers template_preprocess_views_nivo_slider_view() three times instead of one (as a normal block from views would do).

Looking up drupal_add_js at api.drupal.org I found a comment that confirms this behaviour [1] of creating an array of values when drupal_ad_js is called several times with the same key (which would be happening if you call template_preprocess_views_nivo_slider_view() several times).

[1] http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad...

esclapes’s picture

Title: Viewfield stops sliding in Views Nivo Slider when nodewords (module metatag, eg. page-discription) are active » Viewfield views rendering makes Views Nivo Slider stop working

I just disabled nodewords completely and the problems was still there so I change the title to make it more general use-case.

Also marked this other issue at Nivo Slider's queue as a duplicate #1025384: Nivo-Slider does'nt slide when I use it with Viewfield or Viewreference in a Node

jerdavis’s picture

Status: Active » Closed (outdated)

Closing as Drupal 6 is no longer supported.