Hi there. I have a view containing a bunch of field set up, but as soon as I set the format to jCarousel following error occurs:
Fatal error: Call to a member function countQuery() on a non-object in /.../sites/all/modules/jcarousel/includes/jcarousel.views.inc on line 117

After that, nothing goes. Since i am a themer, i tried to easiest way and just uncommented the regarding code lines in the jcarousel.view.inc and it worked, but caused following error:

I have a view where i use jcarousel to scroll through the items, showing 4 at a time, while scrolling 1 slide... so far so good.
But after a while, it rapidly scrolls all slides, before it goes to the next one... The slide show keeps cycling through, but as i said it scrolls swiftly through all slides before moving to the next "regular" slide... It will do a regular 1> 2> 3> 4>... for a while, then 4> 1234> 5> 12345> 6> 123456> 7 and so on... After a while i got sick watching it scrolling 80 slides in just a second... I hope someone can come up with a solution.
Thanks in advance.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ciniko’s picture

Please, is there nothing you can do about it? I found that the magic number, when it starts to break is 43! For some reason, as long as the numberof i set for displayed items is below 43, it keeps working fine...

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)

Could you describe how to produce this issue starting with a fresh view? I am not seeing this problem.

quicksketch’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing after lack of response.

rogical’s picture

got same issue in commerce kickstart

Fatal error: Call to a member function countQuery() on a non-object in /Users/shawn/Downloads/www/development/development/ipartsmart/sites/all/modules/contribute/jcarousel/includes/jcarousel.views.inc on line 146

lasbreyn’s picture

Issue summary: View changes
FileSize
146.24 KB

I got the same error as rogical got.
Fatal error: Call to a member function countQuery() on a non-object in /.../.../../sites/all/modules/jcarousel/includes/jcarousel.views.inc on line 146
I got this when trying to update a view with jcarousel. I am building a site with commerce kickstarts 2 and trying to load nodes references to products. The ajax box pops up like this:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /admin/structure/views/view/display_products/preview/dvds_block/ajax
StatusText: OK
ResponseText:
Fatal error: Call to a member function countQuery() on a non-object in /.../.../../sites/all/modules/jcarousel/includes/jcarousel.views.inc on line 146

The view never renders either.
Taking a look at the code, I found that it works when I commented this out:
/*
// Get the total number of items in this view.
$count_query = $view->build_info['count_query']->countQuery();
$count = $count_query->execute()->fetchField();

// Views may already populate total_rows later, but since we've already
// generated this value, we might as well make it available.
$view->total_rows = $count;
*/

Could it be that $view->build_info['count_query'] is not an object?

Also, the code right above it is repeated twice and may need some cleanup.

// By default limit the scrolling to the same number of items as are visible
// to avoid display glitches.
if (empty($options['scroll']) && !empty($options['visible'])) {
$options['scroll'] = $options['visible'];
}

// By default limit the scrolling to the same number of items as are visible
// to avoid display glitches.
if (empty($options['scroll']) && !empty($options['visible'])) {
$options['scroll'] = $options['visible'];
}

Thanks.

stevenx’s picture

I had the same problem and made a patch from comment #5

not sure if the total count is needed somewhere else...

stevenx’s picture

Status: Closed (cannot reproduce) » Needs review