? 228937.patch Index: views_carousel.js =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/carousel/views_carousel/views_carousel.js,v retrieving revision 1.1 diff -u -p -r1.1 views_carousel.js --- views_carousel.js 8 Feb 2008 19:44:51 -0000 1.1 +++ views_carousel.js 17 Jun 2008 00:45:21 -0000 @@ -83,7 +83,7 @@ viewsCarousel.autoAttach = function() { // Handle args for Views. args = Drupal.settings.viewsCarousel.views[view_name]['args']; if (args.length > 0) { - viewsCarousel.carousel.views[view_name].args = args.join('/'); + vc.args = args.join('/'); } // jCarousel itemLoadCallback() Index: views_carousel.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/carousel/views_carousel/views_carousel.module,v retrieving revision 1.1 diff -u -p -r1.1 views_carousel.module --- views_carousel.module 8 Feb 2008 19:44:51 -0000 1.1 +++ views_carousel.module 17 Jun 2008 00:45:21 -0000 @@ -105,9 +105,20 @@ function views_carousel_ahah($view_name // count of the items in a view might not be accurate. By default, Drupal // and pager_query() will continue to display the last 2 items even though // the $_GET['page'] arg has gone too high. - if ($view->vid && ($total / $view->{'nodes_per_'. $type}) > $_GET['page']) { - $view->use_pager = TRUE; - $output = views_build_view($type, $view, $args, $view->use_pager, $view->{'nodes_per_'. $type}); + $limit = $view->{'nodes_per_'. $type}; + if ($view->vid) { + // The order of these if statements is important, otherwise we are dividing by zero + if ($limit == 0) { + $output = views_build_view($type, $view, $args, $view->use_pager, $view->{'nodes_per_'. $type}); + } + elseif (($total / $limit) > $_GET['page']) { + // We only set the pager when $limit is non-zero + $view->use_pager = TRUE; + $output = views_build_view($type, $view, $args, $view->use_pager, $view->{'nodes_per_'. $type}); + } + else { + // We don't have any content to return, so we just exit + } } print $output;