Great module!

One thing I have noticed is that when a userreview is set to 'unpublished' (status=0 in node table) it is still displayed with the relevant node. This means that the moderation of userreviews does not work.

My guess is that the problem is that the view is loading userreviews which should remain hidden.

Thanks!

Comments

dado’s picture

Excellent point. Looks like we need to replace line 927, this

$view->filter = array ();

with this

$view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
  );

Will commit to CVS tonight

9802008’s picture

Thanks! I pasted the code in and created some new reviews. However reviews are still showing up attached to nodes. If I try to access the review directly, get an access denied message.

dado’s picture

Thanks for testing this. I think you need to refresh the views module's cache. You can do this by going to admin/modules and click submit. Could you report back again whether it now works?

dado’s picture

Status: Active » Fixed

I committed this to CVS, both versions (head & 4.7)

9802008’s picture

Hi Dado

Thanks it works! The code does however still display the 'user reviews' drop down which is now empty. I have just added some text to say 'review cannot be displayed as it is currently being moderated'.

Votes for reviews which have not yet been approved are however still counted towards the total vote.

Cheers

James

dado’s picture

can we call this a feature?

9802008’s picture

yes :-)

Anonymous’s picture

Status: Fixed » Closed (fixed)