Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#10 | 620852-empty_adanced-1.patch | 6.68 KB | redndahead |
Comments
Comment #1
redndahead CreditAttribution: redndahead commentedI'm not able to duplicate this error. Do you have a site where this occurs?
Comment #2
redndahead CreditAttribution: redndahead commentedClosing from lack of response
Comment #4
ball.in.th CreditAttribution: ball.in.th commentedHi,
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.
Comment #5
redndahead CreditAttribution: redndahead commentedI 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.
Comment #6
ball.in.th CreditAttribution: ball.in.th commentedNow 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.
Comment #7
redndahead CreditAttribution: redndahead commentedIn the advanced settings box is there an fckeditor window?
Comment #8
ball.in.th CreditAttribution: ball.in.th commentedNope. 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.
Comment #9
redndahead CreditAttribution: redndahead commentedI 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.
Comment #10
redndahead CreditAttribution: redndahead commentedHere is the patch used.
Comment #12
Shane Birley CreditAttribution: Shane Birley commentedI 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.
Comment #13
redndahead CreditAttribution: redndahead commentedTry 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
Comment #14
redndahead CreditAttribution: redndahead commentedComment #15
Shane Birley CreditAttribution: Shane Birley commentedJust 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. ;)
Comment #16
Shane Birley CreditAttribution: Shane Birley commentedAck. 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.
Comment #17
redndahead CreditAttribution: redndahead commentedYour 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:
So something is up. Not quite sure what it is though.
Comment #18
redndahead CreditAttribution: redndahead commentedFor 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
Comment #19
Shane Birley CreditAttribution: Shane Birley commentedActually, 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.
Comment #20
redndahead CreditAttribution: redndahead commentedI'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
Comment #21
Shane Birley CreditAttribution: Shane Birley commentedVery 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!