Topic Ratings Plugin


(Angus McLeod) #81

Sorry, looks like I overlooked you bug report here. Are you still experiencing this issue?


(EW 👌) #82

:slight_smile:

Yes, I’ve just tested now before I answer you, just in case its fixed with my recent rebuild but, problem still the same :frowning:


(Angus McLeod) #83

Right. Just fixed it. Sorry for the delay here.


(EW 👌) #84

Thank you! Its working fine now :sparkles:


(EW 👌) #85

Dear @angus, till today everything were working just fine. After I’d installed Retort Plugin (@gdpelican), I’ve started to experience exactly the same bug again :scream:


(Again no error log to provide, I’m running the last versions of everything)

Please could you check on it. :four_leaf_clover:


(Durga Viswanath Gadiraju) #86

I just installed as per the instructions and I am getting this error.


(Angus McLeod) #87

This plugin was broken by various discourse/ember updates. Just updated it.


(Christoph) #88

Grat plugin, thanks! I’m not sure why I did not see the option “Use topics in this category to rate things” at first, but when I just upgraded another plugin, it magically appeared…

Anyway, I have a feature request. Currently, when a user posts a topic in a category with rating activated and unticks “Add rating”, ratings are disabled for all subsequent posts in that topic. I don’t like that because I want to make sure that users are encouraged rate any post in the Marketplace category (the idea is that if you advertise a product or service in our forum, you have to accept to have it rated).

I see at least two ways of solving this:

  1. Add an option “Enforce ratings in this category” to the category settings which prevents topic creators from disabling “add rating”. If they don’t want to give a rating, they just leave it at “0 stars”
  2. Change the overall setup so that the OP does not get to decide whether replies to that topic can add a rating or not.

(Hosein Naseri) #89

In recent updates, when I want to send a PM, there is a rating box like normal posts there, which I think it shouldn’t be.


(Angus McLeod) #90

Thanks for reporting this. I recently made some changes to make this plugin interoperable with another plugin.

It should work as normal again.


(Hosein Naseri) #91

Thank you very much. Is it possible to make average rating a float number? like 4.7?


(Angus McLeod) #92

Yup. In fact the averages are already stored in the db rounded to 1 decimal place.

So this small change in the serializer should do the trick.


(Christoph) #93

Are there any known issues with this plugin? I have had it installed for a while but never used it. Now when the first topic came up in a ratings-enabled category, it shows that rating is enabled under the topic title but when I reply, there is no way to actually submit a rating…


(Jay Pfaffman) #94

You can’t rate your own posts. Could that be it?


(Christoph) #95

Good idea, but it’s not my own post. However, the topic owner created the post in a different category and I moved it. Maybe that has something to do with it?


(cpradio) #96

That is almost definitely it. As the same thing (used to?) throw off the topic-timers for auto close when moving from one category to another.


(Christoph) #97

Let’s hope so. But I thought this has been fixed since a while:

I’ve definitely upgraded several times since that commit.


(cpradio) #100

That is not the same thing. This is Topic Ratings, not Polls. Topic Ratings might not be storing its data the same way Polls did.


(Christoph) #101

I should have quoted the commit, which was not specific to any particular plugin

But you are still right that we have a different issue here because we are not moving custom fields out of a topic but we are moving a post into a new topic and that’s probably where the necessary custom fields are not being created/populated. At least that is my guess about what is happening here.


(cpradio) #102

Wait… you are still confusing me.

Are you talking about Polls or Topic Ratings? The PR you linked to was to specifically solve an issue with Polls, which stores its data in the custom_fields associated to a post.

Topic Ratings, stores ratings on a topic. I cannot say (without looking at the code), whether it is on the OP of the topic (thus associating it to the first post in a topic), or if there is another custom_fields variant that is specific for topics. If there is one specific to topics, then the PR you reference is irrelevant, as it only deals with posts.

Edit:
And looking at discourse-ratings/plugin.rb at master · angusmcleod/discourse-ratings · GitHub, I see custom_fields referenced on posts, topics, and categories.

I have a feeling this deals with the topic custom fields. Which the referenced PR does not handle (or possibly the category)