When we 2 slideshow on the same page, but in 2 different block, we get a javascript error "settings.advanced.split is ot a function" in /modules/views_slideshow/contrib/views_slideshow_singleframe/views_slideshow.js?B
Ligne : 64

Everything is blocked

CommentFileSizeAuthor
#10 620852-empty_adanced-1.patch6.68 KBredndahead
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

redndahead’s picture

Status: Active » Postponed (maintainer needs more info)

I'm not able to duplicate this error. Do you have a site where this occurs?

redndahead’s picture

Status: Postponed (maintainer needs more info) » Fixed

Closing from lack of response

Status: Fixed » Closed (fixed)

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

ball.in.th’s picture

Status: Closed (fixed) » Active

Hi,

I just ran into "settings.advanced.split is not a function" error on line 69 of views_slideshow.js as well. Please see an example on our testing page at http://ball.in.th/angel . If there's no error for the first visit, once you're on the test page, go to the same page again.

redndahead’s picture

I see the error. Do you have anything under the advanced section? Is a wysiwyg editor there by any chance? I see it's outputting blank values.

ball.in.th’s picture

Now the advanced section is empty. I've also tried putting "foo: bar" into the advanced section but it didn't seem to fix the error.

The site has FCKeditor installed but can only be used by logged in users.

Not sure if this is related, but the page also has two slideshows.

redndahead’s picture

In the advanced settings box is there an fckeditor window?

ball.in.th’s picture

Nope. The advanced settings box is an empty plain textarea.

Btw, about the two slideshows on the page, both have id=views_slideshow_singleframe_main_1 which should not be good.

redndahead’s picture

Status: Active » Fixed

I don't notice the error on the page anymore. Not sure if you changed something. I'll be making a commit shortly that will fix some problems with the advanced settings. If you still have issues feel free to reopen.

redndahead’s picture

Here is the patch used.

Status: Fixed » Closed (fixed)

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

Shane Birley’s picture

Status: Closed (fixed) » Needs review

I just opened this quickly because I happened to see this in Firebug today on one of my slideshows:

settings.advanced.split is not a function
http://www.example.com/all/modules/views_slideshow/contrib/views_slidesh...
Line 93

There is nothing fancy with the slideshow: singleframe, horizontal scroll, previous and next. The only problem is that I was debugging an error with the controls not appearing all the time. The page would load and the controls would simply not load. Possibly related, but just starting a debug. More if I find anything.

redndahead’s picture

Try re-saving the settings, if that doesn't work then please send me the settings output from your source. It will be within script tags and start with jQuery.extend(Drupal.settings

redndahead’s picture

Status: Needs review » Postponed (maintainer needs more info)
Shane Birley’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Just did a bit more debugging and it looks like it was just a cache error. False alarm! Closing and we will never speak of this again. ;)

Shane Birley’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)

Ack. I spoke too soon:

settings.advanced.split is not a function
http://www.example.com/sites/all/modules/views_slideshow/contrib/views_s...
Line 93

It seems to be related to the cache as the error disappears for a bit and then returns. Here is another tidbit, the controls vanish. The pager controls and the "previous/next" controls disappear as well - at the same time this error comes up.

Here is the data:

jQuery.extend(Drupal.settings, { "basePath": "/", "googleanalytics": { "trackOutgoing": 1, "trackMailto": 1, "trackDownload": 1, "trackDownloadExtensions": "7z|aac|avi|csv|doc|exe|flv|gif|gz|jpe?g|js|mp(3|4|e?g)|mov|pdf|phps|png|ppt|rar|sit|tar|torrent|txt|wma|wmv|xls|xml|zip" }, "lightbox2": { "rtl": 0, "file_path": "/(\\w\\w/)sites/example.com/files", "default_image": "/sites/all/modules/lightbox2/images/brokenimage.jpg", "border_size": 10, "font_color": "000", "box_color": "fff", "top_position": "", "overlay_opacity": "0.8", "overlay_color": "000", "disable_close_click": 1, "resize_sequence": 0, "resize_speed": 400, "fade_in_speed": 400, "slide_down_speed": 600, "use_alt_layout": 0, "disable_resize": 0, "disable_zoom": 1, "force_show_nav": 0, "loop_items": 1, "node_link_text": "", "node_link_target": 0, "image_count": "Image !current of !total", "video_count": "Video !current of !total", "page_count": "Page !current of !total", "lite_press_x_close": "press \x3ca href=\"#\" onclick=\"hideLightbox(); return FALSE;\"\x3e\x3ckbd\x3ex\x3c/kbd\x3e\x3c/a\x3e to close", "download_link_text": "", "enable_login": false, "enable_contact": false, "keys_close": "c x 27", "keys_previous": "p 37", "keys_next": "n 39", "keys_zoom": "z", "keys_play_pause": "32", "display_image_size": "original", "image_node_sizes": "()", "trigger_lightbox_classes": "", "trigger_lightbox_group_classes": "", "trigger_slideshow_classes": "", "trigger_lightframe_classes": "", "trigger_lightframe_group_classes": "", "custom_class_handler": "lightbox_ungrouped", "custom_trigger_classes": "img.originalpop", "disable_for_gallery_lists": 1, "disable_for_acidfree_gallery_lists": true, "enable_acidfree_videos": true, "slideshow_interval": 5000, "slideshow_automatic_start": true, "slideshow_automatic_exit": true, "show_play_pause": true, "pause_on_next_click": false, "pause_on_previous_click": true, "loop_slides": false, "iframe_width": 600, "iframe_height": 400, "iframe_border": 1, "enable_video": 0 }, "imagecart": { "uid": 0, "cart_email_url": "/imagecart/cart_email_js/", "cart_add_url": "/imagecart/cart_add_js/", "cart_request_quote_url": "/imagecart/cart_request_quote_js/", "cart_images_url": "/imagecart/cart_images_js/", "cart_selected_url": "/imagecart/cart_selected_js/", "image_add_url": "/imagecart/image_add_js/", "image_remove_url": "/imagecart/image_remove_js/", "image_save_order_url": "/imagecart/image_save_order_js/" }, "popups": { "originalPath": "gallery/water-abstract/slideshow", "defaultTargetSelector": "div.left-corner \x3e div.clear-block:last", "template": "\x3cdiv id=\"popups\"\x3e\n \x3cdiv id=\"popups-title\"\x3e\n \x3cdiv id=\"popups-close\"\x3e\x3ca href=\"#\"\x3eClose\x3c/a\x3e\x3c/div\x3e\n \x3cdiv class=\"title\"\x3e%title\x3c/div\x3e\n \x3cdiv class=\"clear-block\"\x3e\x3c/div\x3e\n \x3c/div\x3e\n \x3cdiv id=\"popups-body\"\x3e%body\x3c/div\x3e\n \x3cdiv id=\"popups-buttons\"\x3e%buttons\x3c/div\x3e\n \x3cdiv id=\"popups-footer\"\x3e\x3c/div\x3e\n\x3c/div\x3e\n", "modulePath": "sites/example.com/modules/popups", "popupFinalMessage": 1 }, "viewsSlideshowSingleFrame": { "#views_slideshow_singleframe_main_1": { "num_divs": [ 257, 34 ], "id_prefix": [ "#views_slideshow_singleframe_main_", "#views_slideshow_singleframe_main_" ], "div_prefix": [ "#views_slideshow_singleframe_div_", "#views_slideshow_singleframe_div_" ], "id": [ 1, 1 ], "timeout": [ "300000", "10000" ], "sort": [ 1, 1 ], "effect": [ "scrollHorz", "fade" ], "speed": [ "500", "750" ], "delay": [ "0", "0" ], "fixed_height": [ 1, 1 ], "random": [ "0", "1" ], "pause": [ "1", "2" ], "pause_on_click": [ "0", 0 ], "controls": [ "1", "0" ], "pager": [ "0", "0" ], "pager_type": [ "Numbered", "Numbered" ], "page_hover": [ 2, 2 ], "image_count": [ "0", "0" ], "nowrap": [ 0, 0 ], "sync": [ "1", "1" ], "advanced": [ "", "" ], "ie": { "cleartype": [ "true", "true" ], "cleartypenobg": [ "true", "true" ] }, "pager_hover": [ "2", "2" ] } } });

Running latest Drupal, Views, and Views Slideshow.

I can now confirm the js error is preventing the controls js to load, etc, etc. So, it is all connected and I am not crazy. :) Just trying to figure out where it breaks in relation to the Drupal caching system.

redndahead’s picture

Your settings are very weird. It's using an array for each value. Not sure if that's how it worked in 1.0, but in 2.0 there should be a separate set of options for each slideshow. Here is an example of mine:

"viewsSlideshowSingleFrame": { "#views_slideshow_singleframe_main_1": { "num_divs": 10, "id_prefix": "#views_slideshow_singleframe_main_", "div_prefix": "#views_slideshow_singleframe_div_", "id": 1, "view_id": "slideshow-page_1", "timeout": "5000", "sort": 1, "effect": "fade", "speed": "700", "start_paused": null, "delay": "0", "fixed_height": "1", "random": "0", "pause": "1", "pause_on_click": "1", "remember_slide": 0, "remember_slide_days": 1, "controls": "1", "pager": "2", "pager_type": "Thumbnails", "page_hover": 2, "pager_click_to_page": 1, "image_count": "2", "nowrap": "0", "sync": "1", "advanced": "", "ie": { "cleartype": "false", "cleartypenobg": "false" }, "pager_hover": "1" }, "#views_slideshow_singleframe_main_2": { "num_divs": 10, "id_prefix": "#views_slideshow_singleframe_main_", "div_prefix": "#views_slideshow_singleframe_div_", "id": 2, "view_id": "slideshow-block_1", "timeout": "5000", "sort": 1, "effect": "fade", "speed": "700", "start_paused": 0, "delay": "0", "fixed_height": "1", "random": "0", "pause": "1", "pause_on_click": "0", "remember_slide": 0, "remember_slide_days": "1", "controls": "0", "pager": "0", "pager_type": "Numbered", "page_hover": 2, "pager_click_to_page": 0, "image_count": "0", "nowrap": "0", "sync": "1", "advanced": "", "ie": { "cleartype": "true", "cleartypenobg": "false" }, "pager_hover": "1" } }

So something is up. Not quite sure what it is though.

redndahead’s picture

For some reason both of your slideshows are getting the same id. Are you doing anything different like rendering in a node instead of using the block system or something like that?

May want to try this patch to see if it takes care of your issue #571224: Problem with $id variable when overriding breakout-teaser

Shane Birley’s picture

Actually, one of the slideshows on that section of the website is rendered in a block (placed at the top of the website in a region) and the page itself is the other slideshow.

What I have found today is the singleframe.module makes the calls to assign the ids to each of the slideshows. What I have discovered is that if you have views caching on, the ids are not assigned correctly. I wonder if the main drupal core block caching along with the views caching are not friendly.

Here is the latest pull from the jquery. If I turn views caching on for that view, the ids are assigned incorrectly - if it is off, the ids appear to be different.

"viewsSlideshowSingleFrame": { "#views_slideshow_singleframe_main_1": { "num_divs": 260, "id_prefix": "#views_slideshow_singleframe_main_", "div_prefix": "#views_slideshow_singleframe_div_", "id": 1, "timeout": "300000", "sort": 1, "effect": "scrollHorz", "speed": "500", "delay": "0", "fixed_height": "0", "random": "0", "pause": "2", "pause_on_click": "0", "controls": "1", "pager": "0", "pager_type": "Numbered", "page_hover": 2, "image_count": "0", "nowrap": "1", "sync": "1", "advanced": "", "ie": { "cleartype": "false", "cleartypenobg": "false" }, "pager_hover": "2" }, "#views_slideshow_singleframe_main_2": { "num_divs": 34, "id_prefix": "#views_slideshow_singleframe_main_", "div_prefix": "#views_slideshow_singleframe_div_", "id": 2, "timeout": "10000", "sort": 1, "effect": "fade", "speed": "750", "delay": "0", "fixed_height": 1, "random": "1", "pause": "2", "pause_on_click": 0, "controls": "0", "pager": "0", "pager_type": "Numbered", "page_hover": 2, "image_count": "0", "nowrap": 0, "sync": "1", "advanced": "", "ie": { "cleartype": "true", "cleartypenobg": "true" }, "pager_hover": "2" } } });

So, there must be something about the views caching that is messing things up. I just don't have a clue why. And the weird thing is that the views caching was activated for one of the slideshows.

redndahead’s picture

I'm thinking about changing the ID to the view id. That will make the settings specific to that view. Which will eliminate the risk of views caching creating the double id issue. Look for the change in #571224: Problem with $id variable when overriding breakout-teaser

Shane Birley’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Very cool. I will close this issue and move to the other one. At least, I now know that the ida are different. Anyone reading this issue, bounce over to the link above to learn more.

You rock!