Use the default Drupal theme.
Create a review type with two axes, associate it to a custom node type "Hotel" and fill in a first review for a given hotel.
Display the reviewed hotel node.
The node shows "Total Reviews: 1", which is ok.
But it shows "Average Review Rating:" with no value displayed, even if I set values to both axes of the review filled in.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

emptymalei’s picture

Same issue encountered.

ICThawk’s picture

I have totally ripped apart this module. This was one of the issues I had to fix.

To fix this yourself open the nodereview.module file.

at line 407 you'll see

                     . t('Average Review Rating') . ':</span> ',

The problem is there is no call to display the actual percentage. Add that in by replace that line with this line:

                     . t('Average Review Rating') . ': ' . $total . '</span> ',

I also made it so users can review as many times as they want. I removed all instances of the text box to the questions. Also made it so the "short comment" is now a timestamp and prefilled in with the current date&time. Now users can quickly click each rating rating and submit without ever typing. Perfect for touchscreen usage (which I am designing this for).

h3rj4n’s picture

Status: Active » Needs review
FileSize
3.06 KB

I rewrote the hook_node_view a bit. It now uses the functions provided by voting api to get the votes on the node. I guess by applying this patch the support for Vote API 1.x is over.

This patch contains part of ITChawk solution.

jay.lee.bio’s picture

I don't think the patch works. No matter what I do, "Average Review Rating" always says 1. I also just noticed that the "Total Reviews" is also inaccurate, where most of the time it'll say 1, but one of them says 30 when I only have 1 for that node?!?

P.S. I'll retest the patch after I'm done with all the other ones...

h3rj4n’s picture

Status: Needs review » Needs work
FileSize
4.26 KB

This isn't the fix. Only a small update on what I'm working on.

I implemented hook_field_extra_fields so that you can change the location of the 'Average Review Rating'. You can even remove it from the node view. Haven't looked into your problem yet Jay.

jay.lee.bio’s picture

Oh ok. Well at least the field itself is no longer empty. I didn't notice anything different from #3 after applying #5 though, meaning I don't see anywhere that let's me "change the location of the 'Average Review Rating'." I don't know where I can "remove it from the node view" either. But I'll let you continue updating your patch as I'm sure it'll become more clear to me as it gets refined. :D

jay.lee.bio’s picture

Issue summary: View changes

Added "Use the default Drupal theme."