Sorry, looks like I overlooked you bug report here. Are you still experiencing this issue?
ā¦
Yes, Iāve just tested now before I answer you, just in case its fixed with my recent rebuild but, problem still the same
Right. Just fixed it. Sorry for the delay here.
https://github.com/angusmcleod/discourse-ratings/commit/651d40be99c92cd904061b9d0249051a4c46199a
Thank you! Its working fine now
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
(Again no error log to provide, Iām running the last versions of everything)
Please could you check on it.
This plugin was broken by various discourse/ember updates. Just updated it.
https://github.com/angusmcleod/discourse-ratings/commit/d0157bf5095f9b7332a0d144cf8626bab2014d60
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:
- 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ā
- Change the overall setup so that the OP does not get to decide whether replies to that topic can add a rating or not.
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.
Thanks for reporting this. I recently made some changes to make this plugin interoperable with another plugin.
It should work as normal again.
https://github.com/angusmcleod/discourse-ratings/commit/507f8e6e95fd88dc07d1f2a234b4a4c5f91545e7
Thank you very much. Is it possible to make average rating a float number? like 4.7?
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.
https://github.com/angusmcleod/discourse-ratings/commit/8f176955daa1f54d64745ad5e4e8de60838328d0
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ā¦
You canāt rate your own posts. Could that be it?
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?
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.
Letās hope so. But I thought this has been fixed since a while:
Iāve definitely upgraded several times since that commit.
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.
I should have quoted the commit, which was not specific to any particular plugin
https://github.com/discourse/discourse/commit/5794ff53a197b35e67a8ecfbedc6d7d626e872be
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.
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 https://github.com/angusmcleod/discourse-ratings/blob/master/plugin.rb, 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)