I'm getting the following warning:

warning: mysqli_query() [function.mysqli-query]: Empty query in /var/www/public_html/example.com/includes/database.mysqli.inc on line 115.

Everything seems to be working fine. I've tried different skins and changing all of the settings. Nothing makes the error go away. Any help would be appreciated.

thanks.

CommentFileSizeAuthor
#10 jcarousel_view3_count_query.patch1.12 KBquicksketch
#5 views.jpg77.46 KBzdean

Comments

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)

I haven't been able to reproduce this problem. How are you using jCarousel? Are you doing API calls or using the Views integration?

zdean’s picture

Views integration. It's installed on drupal 6.20 and Views 6.x-3.x-dev.

Here's the view:


$view = new view;
$view->name = 'recent_spots';
$view->description = '';
$view->tag = '';
$view->base_table = 'node';
$view->human_name = 'Recent Spots';
$view->core = 6;
$view->api_version = '3.0-alpha1';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Defaults */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'jcarousel';
$handler->display->display_options['style_options']['wrap'] = 'both';
$handler->display->display_options['style_options']['skin'] = 'tango';
$handler->display->display_options['style_options']['visible'] = '';
$handler->display->display_options['style_options']['auto'] = '3';
$handler->display->display_options['style_options']['autoPause'] = 1;
$handler->display->display_options['style_options']['easing'] = 'linear';
$handler->display->display_options['style_options']['vertical'] = 0;
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Content: Spot Image (field_spot_image) */
$handler->display->display_options['fields']['field_spot_image_fid']['id'] = 'field_spot_image_fid';
$handler->display->display_options['fields']['field_spot_image_fid']['table'] = 'node_data_field_spot_image';
$handler->display->display_options['fields']['field_spot_image_fid']['field'] = 'field_spot_image_fid';
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_spot_image_fid']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_spot_image_fid']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_spot_image_fid']['link_to_node'] = 1;
$handler->display->display_options['fields']['field_spot_image_fid']['label_type'] = 'none';
$handler->display->display_options['fields']['field_spot_image_fid']['format'] = 'front_page_recent_spots_carousel_linked';
/* Filter: Node: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
/* Filter: Node: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
  'spot' => 'spot',
);

/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->display->display_options['defaults']['style_plugin'] = FALSE;
$handler->display->display_options['style_plugin'] = 'jcarousel';
$handler->display->display_options['style_options']['wrap'] = 'circular';
$handler->display->display_options['style_options']['visible'] = '5';
$handler->display->display_options['style_options']['scroll'] = '3';
$handler->display->display_options['style_options']['auto'] = '0';
$handler->display->display_options['style_options']['autoPause'] = 0;
$handler->display->display_options['style_options']['animation'] = 'slow';
$handler->display->display_options['style_options']['easing'] = '';
$handler->display->display_options['style_options']['vertical'] = 0;
$handler->display->display_options['defaults']['style_options'] = FALSE;
$handler->display->display_options['defaults']['row_plugin'] = FALSE;
$handler->display->display_options['row_plugin'] = 'fields';
$handler->display->display_options['defaults']['row_options'] = FALSE;
$translatables['recent_spots'] = array(
  t('Defaults'),
  t('more'),
  t('Apply'),
  t('Reset'),
  t('Sort By'),
  t('Asc'),
  t('Desc'),
  t('Block'),
);

thanks for your help.

quicksketch’s picture

Could you try upgrading your version of Views? jCarousel currently is tested against the 6.x-3.x development release of Views. It may not be compatible with the alpha-1 version.

zdean’s picture

that is the version I'm using (along with 6.20 drupal).

thanks.

zdean’s picture

StatusFileSize
new77.46 KB

I see what you're saying...the export I included indicates the alpha version, but I'm actually using the dev (see the attached screen shot). not sure why the discrepancy...

zdean’s picture

Status: Postponed (maintainer needs more info) » Active
eynox’s picture

Anything new regarding this issue ? i'm currently having the same problem, would really appreciate if anyone knows how to fix this.

LGLC’s picture

I'm getting that warning message as well, with the same setup (Drupal 6.20 and the latest Views 6.x-3.x-dev). At first I thought it was because I had the number of items set to 'Auto' (which gave me 4 items) when only 3 results were returned inside my view (causing a permanent ajax throbber to fill in the 4th item, even though ajax wasn't enabled in the view itself), but making sure the view returned enough items didn't seem to help.

thomas.lucas’s picture

Same problem here..

quicksketch’s picture

Title: warning message » Empty query warning message in Views 3
Status: Active » Fixed
StatusFileSize
new1.12 KB

Okay looks like I was the one that needed to update my Views 3 installation. After upgrading I could reproduce the issue, which seems to be caused by $view->build_info being empty in the latest version of Views 3. After some poking around, it looks like the count query that we need has been moved into $view->query->count_query, but only in the latest versions of Views 3 (earlier versions as well as Views 2 have it in $view->build_info['count_query']). This patch pulls in the count query and should prevent this warning message.

Status: Fixed » Closed (fixed)

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