configuration Drupal 7.7, FiveStar 2.x-dev, References module, Unique field.
- I have node value of Story tale
- Every user can write an Review and rate each story tale with multiaxis fivestar like: Idea, Grammar, etc. configures as rating references.
- Every user can create only one review per each story tale (unique field module).
- Rating is available when User create a Review node (so not ajax).
I can attach average rate of each one from multiaxis like Average Grammar, Average Idea etc for story tale by views.
What I can't do is: how to compute average of all multiaxis values it menas create one number computed from rating of Grammar + Ideas.
I tried create a Fivestar field for overall (average value). Then I created Computed field which compute overall value of review.
$overall = ($entity->field_style[$entity->language][0]['rating'] + $entity->field_rate[$entity->language][0]['rating'])/2;
$entity_field[0]['value'] = $overall/10;
$entity->field_overall[$entity->language][0]['rating'] = $overall;
Well Problem is that In field_overall is stored requested value, but VotingApi don't register this change created by computed field and it count 0 as stored value.
So.
1. Problem is that fivestar store this value before computed field compute overall rating
2. Or problem is, that fivestar is reading value not from $entity->field_overall
but from other value.