I am working on a project that aggregates several pieces of contextual information using Panels (3.x). Using the node id as an URL argument, panels loads the appropriate node body, attachments, comments, blocks, and user information into a single page. However, I appear to have an issue: 1. embedding the out-of-box fivestar block, and 2. a promising Views 2 workaround.

1. Fivestar Block
It appears the block that comes with this module is not compatible with Panels. I can embed that block within Panels, but when viewing the rendered page, it's just an empty whitespace.

2. View 2 Work around
I got sneaky and built a View that A) accepts a node id as a parameter, B) creates a relationship with the node: vote results, C) Displays the result as an unformatted field. D) Renders fivestar using the "clickable, with text" appearance.

I go back to my panel, configure it to use this view and it works!!! Sort of... it displays my fivestar in panels, BUT I cannot vote. It's interactive and let's me *try* to vote, but it perpetually says, "Saving your vote..." and when I click out of that page I get this error:

warning: Missing argument 4 for fivestar_vote() in /hsphere/local/home/yadadrop/yadadrop.com/sites/all/modules/fivestar/fivestar.module on line 688.

Summary:
If I am going about putting fivestar into Panels the wrong way, I would appreciate some guidance. However, if fivestar (clickable, with text) is not presently compatible with Panels and/or Views, I am placing my vote to add this feature.

Peace,
Brian

Files: 
CommentFileSizeAuthor
#1 fivestar.jpg154.19 KBBrian294

Comments

StatusFileSize
new154.19 KB

An export of my view for a "Screencast" node type. Screenshot attached too.

$view = new view;
$view->name = 'screencast_detail';
$view->description = 'screencast detail';
$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('relationships', array(
  'votingapi_cache' => array(
    'label' => 'Vote results',
    'required' => 0,
    'votingapi' => array(
      'value_type' => '',
      'tag' => '',
      'function' => 'average',
    ),
    'id' => 'votingapi_cache',
    'table' => 'node',
    'field' => 'votingapi_cache',
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'value' => array(
    'label' => 'Value',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'set_precision' => 0,
    'precision' => '0',
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'appearance' => 'fivestar_views_widget_normal_handler',
    'exclude' => 0,
    'id' => 'value',
    'table' => 'votingapi_cache',
    'field' => 'value',
    'relationship' => 'votingapi_cache',
  ),
));
$handler->override_option('arguments', array(
  'nid' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_user' => 0,
    'default_argument_fixed' => '',
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'image' => 0,
      'panel' => 0,
      'page' => 0,
      'screencast' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'image_size' => array(
      '_original' => '_original',
      'thumbnail' => 'thumbnail',
      'preview' => 'preview',
    ),
    'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'screencast' => 'screencast',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('header_format', '3');
$handler->override_option('header_empty', 0);
$handler->override_option('style_options', array(
  'grouping' => '',
));
$handler->override_option('row_options', array(
  'inline' => array(
    'value' => 'value',
  ),
  'separator' => '',
));

Priority:Normal» Critical

There is definitely an issue with panels. Overriding the nodetemplate with panels still works when the node has a fivestar widget attached but I cannot get it to show in the panel display. All the rest of the node is displayed properly only the fivestar stuff is "stripped".

My uneducated guess would be that this is some issue that has to be solved within panels. I raise the prority to catch the attention of someone deeper knowledge. Maybe this issue has to be moved into the panels queue......

We have the same issue - any updates? thanks.

Subscribe.

Same problem here - Missing argument 4 for fivestar_vote()

Managed to work around it by overriding a field template in views.

  • In views expose the node nid as a field
  • Click on theme -> information, find the field and get the name of the template you need to override, for me it was "views-view-field--deals--nid.tpl.php"
  • Create a new file in your theme using this file name
  • Put this in the file: <?php print drupal_get_form('fivestar_form_node_'. $output, 'node', $output);?>

Thanks. That worked!!! Any clues when this will be fixed?

Version:6.x-1.18» 6.x-1.19
Status:Active» Fixed

I'm using 1.19 and this seems to work just fine there. Marking as fixed. Someone please reopen if you're still experiencing problems.

Status:Fixed» Active

I'm having the same issue as others(1.19): warning: Missing argument 4 for fivestar_vote(). tried doing as #6 said but it didn't seem to work. But I wasn't sure exactly where in my template to put the new php file. I just put it in my main theme folder.

hey
having the same issue, but also with the view itself.

if you create a view with a page, such as /node/%/rate
then add:

Relationships
Node: Vote results - named Average Rating; percent, normal, average
Node: Votes - named My Rating; percent, normal; restrict to current user
Arguments
Node: Nid
Fields
Vote results: Value Average Rating, named Average Rating; Fivestar Display only (or even clickable)
Votes: Value My Rating, named Average Rating; Fivestar Clickable

weather or not you add Votes + Voting results or just Votes or Voting results, the behavior is always the same:
it's clickable, but doesn't saves the result.

instead the URL changes to something like /node/77/rate#60
where #60 is the vote you casted.
it never saves.
neither as a View page, nor as a Panel Context.

on the other hand,
with flags, it does work, in both Views and Panels with Views (context), when having arguments in the View (nid) and even when mixed with Fivestars.

dumping the export of my view bellow.

it has the defaults, 3 context pages for use in Panels and a page for testing Fivestar and Flags.
among the fields, there's product info (ubercart), 1 product image (imagefield), title, body, fivestars and flags.

the intention was to create 3 views to use in panels (left side, right side and footer), each with some content.
sure i could do this with Display Suite, but it doesn't support Flags and has a fixed layout...

$view = new view;
$view->name = 'products_view';
$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(
  'title' => 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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
));
$handler->override_option('arguments', array(
  'nid' => array(
    'default_action' => 'ignore',
    'style_plugin' => 'default_summary',
    'style_options' => array(),
    'wildcard' => 'all',
    'wildcard_substitution' => 'All',
    'title' => '',
    'breadcrumb' => '',
    'default_argument_type' => 'fixed',
    'default_argument' => '',
    'validate_type' => 'none',
    'validate_fail' => 'not found',
    'break_phrase' => 0,
    'not' => 0,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'validate_user_argument_type' => 'uid',
    'validate_user_roles' => array(
      '2' => 0,
      '3' => 0,
      '4' => 0,
      '5' => 0,
      '6' => 0,
      '7' => 0,
      '8' => 0,
    ),
    'relationship' => 'none',
    'default_options_div_prefix' => '',
    'default_argument_fixed' => '',
    'default_argument_user' => 0,
    'default_argument_php' => '',
    'validate_argument_node_type' => array(
      'blog' => 0,
      'poll' => 0,
      'product' => 0,
      'forum' => 0,
      'panel' => 0,
      'book' => 0,
      'formulario' => 0,
      'page' => 0,
      'photo' => 0,
      'photo2' => 0,
      'story' => 0,
    ),
    'validate_argument_node_access' => 0,
    'validate_argument_nid_type' => 'nid',
    'validate_argument_vocabulary' => array(
      '1' => 0,
      '4' => 0,
      '5' => 0,
      '3' => 0,
      '2' => 0,
    ),
    'validate_argument_type' => 'tid',
    'validate_argument_transform' => 0,
    'validate_user_restrict_roles' => 0,
    'validate_argument_node_flag_name' => '*relationship*',
    'validate_argument_node_flag_test' => 'flaggable',
    'validate_argument_node_flag_id_type' => 'id',
    'validate_argument_user_flag_name' => '*relationship*',
    'validate_argument_user_flag_test' => 'flaggable',
    'validate_argument_user_flag_id_type' => 'id',
    'validate_argument_php' => '',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'product' => 'product',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'is_product' => array(
    'operator' => '=',
    'value' => '1',
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'is_product',
    'table' => 'uc_products',
    'field' => 'is_product',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler = $view->new_display('ctools_context', 'Name & Body', 'ctools_context_1');
$handler->override_option('fields', array(
  'title' => 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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'model' => array(
    'label' => 'SKU',
    '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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'model',
    'table' => 'uc_products',
    'field' => 'model',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'body' => 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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'body',
    'table' => 'node_revisions',
    'field' => 'body',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('style_plugin', 'ctools_context');
$handler->override_option('admin_title', '');
$handler = $view->new_display('ctools_context', 'Product Info', 'ctools_context_2');
$handler->override_option('fields', array(
  'field_image_cache_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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'label_type' => 'none',
    'format' => 'product_default',
    'multiple' => array(
      'group' => 1,
      'multiple_number' => '1',
      'multiple_from' => '',
      'multiple_reversed' => 0,
    ),
    'exclude' => 0,
    'id' => 'field_image_cache_fid',
    'table' => 'node_data_field_image_cache',
    'field' => 'field_image_cache_fid',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'weight' => array(
    'label' => 'Weight',
    '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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'set_precision' => 0,
    'precision' => '0',
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'format' => 'uc_weight',
    'exclude' => 0,
    'id' => 'weight',
    'table' => 'uc_products',
    'field' => 'weight',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'sell_price' => 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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'set_precision' => 0,
    'precision' => '0',
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'format' => 'uc_price',
    'revision' => 'themed',
    'exclude' => 0,
    'id' => 'sell_price',
    'table' => 'uc_products',
    'field' => 'sell_price',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'addtocartlink' => 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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'exclude' => 0,
    'id' => 'addtocartlink',
    'table' => 'uc_products',
    'field' => 'addtocartlink',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('style_plugin', 'ctools_context');
$handler->override_option('admin_title', '');
$handler = $view->new_display('ctools_context', 'Footer', 'ctools_context_3');
$handler->override_option('relationships', array(
  'flag_content_rel' => array(
    'label' => 'Bookmark',
    'required' => 0,
    'flag' => 'bookmarks',
    'user_scope' => 'any',
    'id' => 'flag_content_rel',
    'table' => 'node',
    'field' => 'flag_content_rel',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'votingapi_cache' => array(
    'label' => 'Average Rating',
    'required' => 0,
    'votingapi' => array(
      'value_type' => 'percent',
      'tag' => 'vote',
      'function' => 'average',
    ),
    'id' => 'votingapi_cache',
    'table' => 'node',
    'field' => 'votingapi_cache',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'votingapi_vote' => array(
    'label' => 'My Rating',
    'required' => 0,
    'votingapi' => array(
      'value_type' => 'percent',
      'tag' => 'vote',
    ),
    'current_user' => 0,
    'id' => 'votingapi_vote',
    'table' => 'node',
    'field' => 'votingapi_vote',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'ops' => 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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_type' => 'toggle',
    'exclude' => 0,
    'id' => 'ops',
    'table' => 'flag_content',
    'field' => 'ops',
    'relationship' => 'flag_content_rel',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'value' => array(
    'label' => 'Average Rating',
    '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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'set_precision' => 0,
    'precision' => '0',
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'appearance' => 'fivestar_views_widget_normal_handler',
    'exclude' => 0,
    'id' => 'value',
    'table' => 'votingapi_cache',
    'field' => 'value',
    'relationship' => 'votingapi_cache',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'value_1' => array(
    'label' => 'My Rating',
    '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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'set_precision' => 0,
    'precision' => '0',
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'appearance' => 'fivestar_views_widget_normal_handler',
    'exclude' => 0,
    'id' => 'value_1',
    'table' => 'votingapi_vote',
    'field' => 'value',
    'relationship' => 'votingapi_vote',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
));
$handler->override_option('style_plugin', 'ctools_context');
$handler->override_option('row_options', array(
  'inline' => array(),
  'separator' => '',
  'hide_empty' => 0,
));
$handler->override_option('admin_title', '');
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('relationships', array(
  'flag_content_rel' => array(
    'label' => 'Bookmark',
    'required' => 0,
    'flag' => 'bookmarks',
    'user_scope' => 'any',
    'id' => 'flag_content_rel',
    'table' => 'node',
    'field' => 'flag_content_rel',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'votingapi_cache' => array(
    'label' => 'Average Rating',
    'required' => 0,
    'votingapi' => array(
      'value_type' => 'percent',
      'tag' => 'vote',
      'function' => 'average',
    ),
    'id' => 'votingapi_cache',
    'table' => 'node',
    'field' => 'votingapi_cache',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
  'votingapi_vote' => array(
    'label' => 'My Rating',
    'required' => 0,
    'votingapi' => array(
      'value_type' => 'percent',
      'tag' => 'vote',
    ),
    'current_user' => TRUE,
    'id' => 'votingapi_vote',
    'table' => 'node',
    'field' => 'votingapi_vote',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'title' => 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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
  ),
  'ops' => array(
    'label' => 'Bookmark',
    '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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'link_type' => 'toggle',
    'exclude' => 0,
    'id' => 'ops',
    'table' => 'flag_content',
    'field' => 'ops',
    'relationship' => 'flag_content_rel',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'value' => array(
    'label' => 'Average Rating',
    '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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'set_precision' => 0,
    'precision' => '0',
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'appearance' => 'fivestar_views_value_display_handler',
    'exclude' => 0,
    'id' => 'value',
    'table' => 'votingapi_cache',
    'field' => 'value',
    'relationship' => 'votingapi_cache',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'value_1' => array(
    'label' => 'My Rating',
    '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,
      'html' => 0,
      'strip_tags' => 0,
    ),
    'empty' => '',
    'hide_empty' => 0,
    'empty_zero' => 0,
    'set_precision' => 0,
    'precision' => '0',
    'decimal' => '.',
    'separator' => ',',
    'prefix' => '',
    'suffix' => '',
    'appearance' => 'fivestar_views_widget_compact_handler',
    'exclude' => 0,
    'id' => 'value_1',
    'table' => 'votingapi_vote',
    'field' => 'value',
    'relationship' => 'votingapi_vote',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
));
$handler->override_option('path', 'node/%/rate');
$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,
  'name' => 'navigation',
));

LPCA explains the problem much better than me. "add Votes + Voting results or just Votes or Voting results, the behavior is always the same:
it's clickable, but doesn't saves the result." this is the same exact problem I'm having. Thanks for the thorough explanation of the issue. I hope there is an easy fix for this

I am looking for this functionality too!

Same issue here: votes are not saved + missing argument error.

Issue tags:+not saving

Here's the behavior I have noted, on 6.x-1.19. I have a view embedded in a content pane. The view works to save votes when I have the following settings:

Relationship:

Node: Vote Results (not required)
Filters:Percent, Normal vote, Average vote

Field:

Vote results: Value

Appearance: Fivestar Stars (clickable, with text)
Relationship: Vote results
Label: Rate this video

However, if I use the Node: Votes relationship, and, I believe, either filter it down to the current user or leave it at all users, then the message will *say* that the vote is being saved, but it is actually not saved at all.

I can use the Node: Vote Results relationship, but I would really like to use the "smart stars" (the ones that show either the average or the current user's vote), since that is the client's expectation (and a logical one, I would think).

I can provide an export of the view if necessary, but I will pastebin it rather than adding to the length of this issue.

I am going to try the workaround of #6 to see if it solves my issue for now, since I am desperate (deadline).

(Deleted a few tags on the issue for relevance.)

Title:Panels / Views compatability issue?Fivestar widget does not save votes when used in a Views added to a Panel pane (with Node: Votes relationship)

The fix from #6 worked, as I expected it would (the markup it generates is horrendous, but seemingly the same as the markup for the "smart stars" on a node display).

I think that fix could probably be bundled into a field plugin for views, as a stopgap fix, although it would be great to get to the root cause of the issue.

(I just double-checked Dblog - this is "Missing argument 4 for fivestar_vote()" in my case, also. I will try to do some more digging when I am not facing a deadline.)

same issue, on 6.x-1.19. Votes still not saved.
tried to apply #6 above, it gives a lot of errors like below, looks like a viewed $output. Any ideas?

- Select-ratingPoorOkayGoodGreatAwesome -Your-rating:-4-(4-votes)
">
- Select-ratingPoorOkayGoodGreatAwesome -Your-rating:-4-(4-votes)
-form-token" value="4b2c77abed38233861aaadf0fce1695e" />
- Select-ratingPoorOkayGoodGreatAwesome -Your-rating:-4-(4-votes)
" value="fivestar_form_node_

Solution at #6 works for me. Using Views 6.x-2.12 and Drupal 6.20. Cheers @jimbojingers

I had exactly the same prob. Widget stuck at saving your vote in a view.

Fixed it by giving all three values in Node: Vote relationships ::

Value type:
Vote tag:
Aggregation function:

i.e., don't leave any to default.

Worked!

:)

Hi,
#6 http://drupal.org/node/558406#comment-2319358 did the trick to get votes showing up in the results!
Does it need to be used like that, or is there also a patch somewhere?
I use fivestar within views/within panels.
Greetings, Martijn

Status:Active» Closed (won't fix)

We can no longer support the Drupal 6 version of Fivestar. It is in security maintenance mode only. When the Drupal 8 version of Fivestar is released, the Drupal 6 version will be officially deprecated.