Error: $(settings.targetId).cycle is not a function

info_dump - November 15, 2009 - 09:28
Project:Views Slideshow
Version:6.x-2.0-beta2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I've just installed Views Slideshow and I'm trying to get it to work. I've created a View that is supposed to be a single frame slideshow of photos contained within a particular node. I'm pretty sure I have the View set up correctly - I've followed all the instructions I could find here - but the slide show doesn't do anything. It shows one image, and doesn't change. This also happens if I try to make a slideshow that displays article (node) titles.

When I view my slideshow page in Firefox, and look at the Error Console, this is the error message I get:

Error: $(settings.targetId).cycle is not a function
Source File: http://[www.mysite.com]/sites/all/modules/views_slideshow/contrib/views_slideshow_singleframe/views_slideshow.js?7
Line: 88

I checked the page source, and as far as I can tell, all the correct JS files are loaded:

jquery.js
jquery.cycle.all.min.js
views_slideshow.js

I've checked the issues database and can't find anything quite like this. I'm afraid I don't know what else to try at this point.

If you think I've forgotten any details I'll be happy to supply them. Thanks!

#1

redndahead - November 15, 2009 - 10:44
Status:active» postponed (maintainer needs more info)

hmm it seems it should load. Could jquery.cycle be loading twice? Maybe you can try clearing your cache and see if that helps. Is there a site I can look at?

#2

info_dump - November 15, 2009 - 20:10

I've just e-mailed you the URL. I would rather not post it on the forum.

Also, for the sake of being thorough, here is the exported View:

<?php
$view
= new view;
$view->name = 'cafes_slideshow';
$view->description = '';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
 
'field_photo_fid' => array(
   
'label' => '',
   
'alter' => array(
     
'alter_text' => 0,
     
'text' => '',
     
'make_link' => 0,
     
'path' => '',
     
'link_class' => '',
     
'alt' => '',
     
'prefix' => '',
     
'suffix' => '',
     
'target' => '',
     
'help' => '',
     
'trim' => 0,
     
'max_length' => '',
     
'word_boundary' => 1,
     
'ellipsis' => 1,
     
'strip_tags' => 0,
     
'html' => 0,
    ),
   
'empty' => '',
   
'hide_empty' => 0,
   
'empty_zero' => 0,
   
'link_to_node' => 0,
   
'label_type' => 'none',
   
'format' => 'Cafe_Slideshow_Photo_default',
   
'multiple' => array(
     
'group' => 0,
     
'multiple_number' => '',
     
'multiple_from' => '',
     
'multiple_reversed' => 0,
    ),
   
'exclude' => 0,
   
'id' => 'field_photo_fid',
   
'table' => 'node_data_field_photo',
   
'field' => 'field_photo_fid',
   
'relationship' => 'none',
  ),
 
'field_photo_data' => array(
   
'label' => '',
   
'alter' => array(
     
'alter_text' => 0,
     
'text' => '',
     
'make_link' => 0,
     
'path' => '',
     
'link_class' => '',
     
'alt' => '',
     
'prefix' => '',
     
'suffix' => '',
     
'target' => '',
     
'help' => '',
     
'trim' => 0,
     
'max_length' => '',
     
'word_boundary' => 1,
     
'ellipsis' => 1,
     
'strip_tags' => 0,
     
'html' => 0,
    ),
   
'empty' => '',
   
'hide_empty' => 0,
   
'empty_zero' => 0,
   
'link_to_node' => 0,
   
'data_key' => 'description',
   
'exclude' => 0,
   
'id' => 'field_photo_data',
   
'table' => 'node_data_field_photo',
   
'field' => 'field_photo_data',
   
'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
 
'title' => array(
   
'operator' => '=',
   
'value' => 'Cafés Slideshow',
   
'group' => '0',
   
'exposed' => FALSE,
   
'expose' => array(
     
'operator' => FALSE,
     
'label' => '',
    ),
   
'case' => 1,
   
'id' => 'title',
   
'table' => 'node',
   
'field' => 'title',
   
'relationship' => 'none',
  ),
 
'type' => array(
   
'operator' => 'in',
   
'value' => array(
     
'cafes_slideshow' => 'cafes_slideshow',
    ),
   
'group' => '0',
   
'exposed' => FALSE,
   
'expose' => array(
     
'operator' => FALSE,
     
'label' => '',
    ),
   
'id' => 'type',
   
'table' => 'node',
   
'field' => 'type',
   
'relationship' => 'none',
  ),
 
'status' => array(
   
'operator' => '=',
   
'value' => '1',
   
'group' => '0',
   
'exposed' => FALSE,
   
'expose' => array(
     
'operator' => FALSE,
     
'label' => '',
    ),
   
'id' => 'status',
   
'table' => 'node',
   
'field' => 'status',
   
'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
 
'type' => 'none',
));
$handler->override_option('cache', array(
 
'type' => 'none',
));
$handler->override_option('use_ajax', TRUE);
$handler->override_option('items_per_page', 0);
$handler->override_option('style_plugin', 'slideshow');
$handler->override_option('style_options', array(
 
'grouping' => '',
 
'type' => 'ul',
 
'mode' => 'singleframe',
 
'singleframe' => array(
   
'timeout' => '5000',
   
'delay' => '0',
   
'speed' => '700',
   
'random' => '0',
   
'pause' => '1',
   
'controls' => '0',
   
'pager' => '0',
   
'pager_type' => '0',
   
'pager_hover' => '2',
   
'image_count' => '0',
   
'effect' => 'fade',
   
'sync' => '2',
   
'advanced' => '',
   
'ie' => array(
     
'cleartype' => 'true',
     
'cleartypenobg' => 'false',
    ),
  ),
 
'thumbnailhover' => array(
   
'hover_breakout' => 'teaser',
   
'teasers_last' => 1,
   
'timeout' => '5000',
   
'delay' => '0',
   
'speed' => '300',
   
'random' => '0',
   
'pause' => '',
   
'pager_event' => 'mouseover',
   
'controls' => '0',
   
'image_count' => '0',
   
'effect' => 'fade',
   
'sync' => '2',
   
'advanced' => '',
   
'ie' => array(
     
'cleartype' => 'true',
     
'cleartypenobg' => 'false',
    ),
  ),
));
$handler->override_option('row_options', array(
 
'inline' => array(),
 
'separator' => '',
 
'hide_empty' => 1,
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'slideshow');
$handler->override_option('menu', array(
 
'type' => 'none',
 
'title' => '',
 
'description' => '',
 
'weight' => 0,
 
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
 
'type' => 'none',
 
'title' => '',
 
'description' => '',
 
'weight' => 0,
));
?>

and the View's output:

SELECT node.nid AS nid, node_data_field_photo.field_photo_fid AS node_data_field_photo_field_photo_fid, node_data_field_photo.field_photo_list AS node_data_field_photo_field_photo_list, node_data_field_photo.field_photo_data AS node_data_field_photo_field_photo_data, node_data_field_photo.delta AS node_data_field_photo_delta, node.type AS node_type, node.vid AS node_vid, node_data_field_photo.nid AS node_data_field_photo_nid FROM node node  LEFT JOIN content_field_photo node_data_field_photo ON node.vid = node_data_field_photo.vid WHERE ((node.title) = ('Cafés Slideshow')) AND (node.type in ('cafes_slideshow')) AND (node.status <> 0)

Thanks for the reply!

#3

info_dump - November 15, 2009 - 20:40

Oh, and I forgot to mention I cleared the cache. I had high hopes, but no such luck.

#4

redndahead - November 15, 2009 - 20:42

Looking at the site it seems jquery is being loaded twice. Can you try to disable the module that is loading it the second time and see if it works.

#5

info_dump - November 15, 2009 - 23:06

Oh, I see. I have calls for jQuery in my site.info file. If I remove it the slideshow works, but then that breaks other jQuery-based stuff on the site - specifically my various tabbed menus.

Any thoughts on getting them all to cooperate? Is there a way to get the slideshow to use the jQuery scripts I already have loaded, or to get my tabbed menus to use the jQuery script that the slideshow uses?

I am fairly new to Drupal, so if that's a dumb question then please bear with me.

#6

redndahead - November 16, 2009 - 00:10
Status:postponed (maintainer needs more info)» fixed

You can use http://drupal.org/project/jquery_update to manage updating your jquery version in your site.

#7

info_dump - November 16, 2009 - 01:41

Excellent - got it working. Thanks!

#8

System Message - November 30, 2009 - 01:50
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.