Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have installed the module and configured. However it is only allowing a user to review once per content type? I.E. if I create a content type session and enable and configure it for review. Then I create 5 sessions. A user can only create a review for one session. If they go to different session as the same user there is no review form.
Is this the correct behavour?
Comments
Comment #1
joekrukoskyWhether this was the intended behavior or not, I needed to allow one review per user per node. Not one per 'review' type. After tracing the code I found the following query to be the restriction:
in nodereview.module in the function nodereview_nodeapi, line 437
this only checks to see if the user has a review of a particular type.
By changing the query to check the reviewed_nid as well I was able to achieve the behavior I wanted:
Thought I post this encase anyone else needed this behavior as well.
Comment #2
yaworsk CreditAttribution: yaworsk commentedHey Joe,
thanks for pointing that out - I was planning on taking a look this weekend so thanks for sharing your solution.
I've been working with the module on a couple other sites and updated the code to make a better/cleaner use of the node system so I'll probably revisit that as well and post a patch for testing.
Pete