Fivestar 1.15 voting issue - bad arguement
| Project: | Fivestar |
| Version: | 6.x-1.18 |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Sorry for the repost but I buried my last one in a thread that looked somewhat similar. I do need to resolve this somewhat soon.
I just came on this problem with the upgrade to fivestar 1.15. Previous to that, voting worked through views worked fine (1.14). After the upgrade, voting only works on nodes directly, not exposed through views. In views it sits on "Saving your vote". All relevent modules are at their latest release (voting API and Views)
Any ideas?
Example:
http://www.alanlouie.com/node/4660
Clicking on any stars will be stuck at 'saving your vote'
But if you click into a node (click the title or use the link below), clicking on the fivestar will work fine
http://www.alanlouie.com/node/4656
It doesn't work for either logged in or anonymous users (and the permissions are fine)
I have already deleted the whole directory and unzipped 1.15 into it
More information from watchdog
Message : %message in %file on line %line.
Error: Missing argument 4 for fivestar_vote() in /home/aklouie/alanlouie.com/modules/fivestar/fivestar.module on line 688.
Location: http://www.alanlouie.com/fivestar/vote/node/4650//100?token=9c1b1f95bf2e...
Referer: http://www.alanlouie.com/node/4660
The function in question is this one
function fivestar_vote($type, $cid, $tag, $value) { <-------------- line 688
drupal_set_header("Content-Type: text/xml");
$output = '';
$output .= '<?xml version="1.0" encoding="UTF-8"?>';
// Rebuild the #auto_submit_path that was used as the token seed.
$path = preg_replace('/\/'. $value .'$/', '', $_GET['q']);
if (!isset($_GET['token']) || !fivestar_check_token($_GET['token'], $path)) {
$output .= ''. t('Invalid token') .'';
exit($output);
}
$result = _fivestar_cast_vote($type, $cid, $value, $tag, NULL, TRUE);
votingapi_recalculate_results($type, $cid);
if ($type == 'node') {
$node = node_load($cid);
}
$stars = variable_get('fivestar_stars_'. (!isset($node) ? 'default' : $node->type), 5);
$feedback_enable = variable_get('fivestar_feedback_'. (!isset($node) ? 'default' : $node->type), 1);
$output .= '';
if (count($result)) {
foreach ($result as $data) {
if ($data['tag'] == $tag) {
$output .= '<'. $data['function'] .'>'. $data['value'] .'';
$summary[$data['tag']][$data['function']] = $data['value'];
}
}
}

#1
I came across the exact same issue the very same day (today) as well... For now, I just downgraded to Fivestar 1.14, but I am trying to see if a patch would fix it.
#2
More info. Reverting to 1.14 does not resolve but reversion to 1.13 does. So I assume I upgraded from 1.13 to 1.15 to break it.
#3
I got a new client and this exact issue - but his is 1.13 . I can't tell if it has been downgraded, but I'll ask him.
I'm also at a loss here.
#4
in fact, scratch that.
I just tried accessing the node to vote directly. didn't work. now I'm confused.
#5
I too have this same problem. So far I could isolate this behaviour:
Views set with View Type other than "Full Node" (ie. Gridview, List) - gives me the "Missing argument 4 for fivestar_vote()"
If my view is set for "full nodes", votes are recorded successfully.
I have a gridview so for the time being I have disabled the 'clickable' setting for its fivestar field.
#6
My issue (described in the previous post) is resolved by patch http://drupal.org/node/503142
#7
This should be fixed in the 1.16 version (at least I'm unable to reproduce it now). Please reopen if this problem still exists in this latest version.
#8
.. still experiencing this same bug on latest 1.18 version of Fivestar.. :|
the problem seems related to the following:
Row style: Fields
Fields: Vote results: Value
setting Row style: Node everything works fine
i'm working locally at the moment, in case let me know if an export of the view might help
#9
@marcoBauli: Sorry to hear that you're having problems, but I don't understand the problem you're reporting. This issue is about a bug that prevents people from voting. The "Vote results: Value" field isn't intended to let you vote on something. Additionally, with the latest version of Fivestar, I am able to vote on nodes in a view whether they are teasers or full nodes, so this issue appears to be fixed.
Can you please clarify whether your issue is part of the one other people in this thread experienced, and if not, open a new issue for it with a description of the problem and how to replicate it, so that we can look into it?
Thanks!
#10
@ezra-g: here is a way to replicate the problem: http://drupal.org/node/558406
#11
I have the same issue, using Fivestar 1.18. Votes are saved for the Views block I have on the Home page, but not in the Views block I have on another page.
Both are using the fields Row style. The only difference between the two is the one that doesn't work is using AJAX and the mini pager and the other is not using either. But turning off AJAX and mini pager didn't fix the problem.
#12
same problem here, Error: Missing argument 4 for fivestar_vote() in .../fivestar.module on line 688. I get "saving your vote" untill a page reload, and then the error message is there.
using Fivestar 6.18
Style is "Grid" and Row style is set on "fields", but when set on "node" it works fine. Since I want to allow users voting just on a cck field from a node (not the whole node), showing the whole node in a view doesn´t work for me. I understand than u guys maybe did not think of letting users vote with field Votes:Value, but it appears that some of us would enjoy that. :)
Looking forward to some work around. Have not tested 2.x version of Fivestar yet...
#13
Just ran into this same problem, wanting to be able to vote in a view using row style: fields instead of node.
Hoping that it will get fixed in a future version.
#14
I also am seeing the same problem.
Voting works on nodes, but when i include the widget as a field of a table, clicking on any stars will be stuck at 'saving your vote'. When i go elsewhere after that i get the error '"Missing argument 4 for fivestar_vote()'. Is there a way to pass the missing tag into the view?
BTW: and unrelated, but has anyone ever used this module and heard from those being voted that they wanted their (low) results hidden from the public?
#15
I have resolved my issue now. In the relationship definition for node: vote results, I have now selected the filter 'normal vote'. It had been set to 'no filter' before. If anyone can explain these 'data filters' better, it would certinly be helpful.
BTW - thanks for your great module!