# Topic Ratings Plugin

**URL:** https://meta.discourse.org/t/topic-ratings-plugin/39578
**Category:** Plugin
**Tags:** pavilion
**Created:** [February 14, 2016, 9:06pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578 "2016-02-14T21:06:53Z")
**Posts on this page:** 20
**Page:** 12

<div class="post-metadata">

### Author: ![Garrick](https://avatars.discourse-cdn.com/v4/letter/g/b9bd4f/32.png) [@Garrick](https://meta.discourse.org/u/Garrick)
#### Post date: [August 28, 2019, 5:08am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/228 "2019-08-28T05:08:50Z")

</div>

Thanks @angus . Just tried it and worked fine. Thanka again!

---

<div class="post-metadata">

### Author: ![GuilhermeBac](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/guilhermebac/32/139122_2.png) [@GuilhermeBac](https://meta.discourse.org/u/GuilhermeBac)
#### Post date: [September 28, 2019, 7:11pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/229 "2019-09-28T19:11:58Z")

</div>

These buttons are disappearing when activating the plugin:

 ![image](https://global.discourse-cdn.com/meta/original/3X/f/b/fbae616eff345245eac2636a348233aceb4d0d1d.png)

**My app.yml**  
cd: $home/plugins  
cmd:  
- git clone [GitHub - discourse/docker\_manager: Plugin for use with discourse docker image · GitHub](https://github.com/discourse/docker_manager.git)  
- git clone [GitHub - paviliondev/discourse-ratings: A Discourse plugin that lets you use topics to rate things · GitHub](https://github.com/paviliondev/discourse-ratings.git)

Just installed discourse yesterday

---

<div class="post-metadata">

### Author: ![Mahesh\_Tirthakar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mahesh_tirthakar/32/137238_2.png) [@Mahesh\_Tirthakar](https://meta.discourse.org/u/Mahesh_Tirthakar)
#### Post date: [September 30, 2019, 12:22pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/230 "2019-09-30T12:22:10Z")

</div>

Sir , I have installed 2.4.0.beta4 vesion of Discourse. I have installed two plugins discourse-rating ([GitHub - paviliondev/discourse-ratings: A Discourse plugin that lets you use topics to rate things · GitHub](https://github.com/paviliondev/discourse-ratings)) and discourse-topic-preview ([GitHub - merefield/discourse-topic-previews-sidecar: A Discourse plugin that complements the Topic Previews Theme Component to add features · GitHub](https://github.com/angusmcleod/discourse-topic-previews)) . we have developed post badge plugin. all these plugins working fine in v2.4.0.beta2 +342 version. but not in .4.0.beta4 vesion. Kindly look into this issues. if you want any more info then let me know

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [October 1, 2019, 6:39am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/231 "2019-10-01T06:39:56Z")

</div>

Hey, @Mahesh_Tirthakar Please file a full bug report here: [Pavilion](https://thepavilion.io/w/bug-report)

---

<div class="post-metadata">

### Author: ![Siddhu\_Dhangar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/siddhu_dhangar/32/123849_2.png) [@Siddhu\_Dhangar](https://meta.discourse.org/u/Siddhu_Dhangar)
#### Post date: [October 2, 2019, 3:35pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/232 "2019-10-02T15:35:10Z")

</div>

i have installed rating plugin in discourse development which is 2.4.0.beta5 but in docker discourse version it is not working ???

---

<div class="post-metadata">

### Author: ![Siddhu\_Dhangar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/siddhu_dhangar/32/123849_2.png) [@Siddhu\_Dhangar](https://meta.discourse.org/u/Siddhu_Dhangar)
#### Post date: [October 2, 2019, 3:51pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/233 "2019-10-02T15:51:41Z")

</div>

```plaintext
./launcher rebuild app

```

after rebuilding the docker discourse instance it is working. thanks.

---

<div class="post-metadata">

### Author: ![Viki](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/viki/32/131139_2.png) [@Viki](https://meta.discourse.org/u/Viki)
#### Post date: [October 21, 2019, 5:35pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/234 "2019-10-21T17:35:07Z")

</div>

Rating Shows before the **Username** in **Mobile view**  
 ![image](https://global.discourse-cdn.com/meta/original/3X/c/c/cc3747ba2d53d37c9a4b5a4abe0ec92f6e026b80.png)

---

<div class="post-metadata">

### Author: ![srikanth](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/srikanth/32/160962_2.png) [@srikanth](https://meta.discourse.org/u/srikanth)
#### Post date: [November 18, 2019, 6:25am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/235 "2019-11-18T06:25:16Z")

</div>

How to sort the topics in home page by rating?

---

<div class="post-metadata">

### Author: ![Bcat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bcat/32/163148_2.png) [@Bcat](https://meta.discourse.org/u/Bcat)
#### Post date: [February 12, 2020, 4:10am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/236 "2020-02-12T04:10:23Z")

</div>

aggregateRating Show on Thread when **view-source** and Google errors

```
<div itemscope itemtype="http://schema.org/CreativeWork">
  <span itemprop="name">TITLE</span>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue"></span>
    <span itemprop="ratingCount">0</span>
  </div>
</div>

```

Category is disable Rating.

When check element is aggregateRating empty. How to remove when view-source

---

<div class="post-metadata">

### Author: ![Bcat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bcat/32/163148_2.png) [@Bcat](https://meta.discourse.org/u/Bcat)
#### Post date: [February 24, 2020, 4:23am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/237 "2020-02-24T04:23:30Z")

</div>

Do you think it’s time to move on : **CreativeWorkSeries** @angus

```plaintext
{
    "@context": "https://schema.org/",
    "@type": "CreativeWorkSeries",
    "name": "[title]",
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "[score]",
        "bestRating": "[best]",
        "ratingCount": "[count]"
    }
}

```

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [February 24, 2020, 5:06am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/238 "2020-02-24T05:06:32Z")

</div>

@Bcat Thanks for the note. I’ll take a look at it later in the week.

---

<div class="post-metadata">

### Author: ![art.ardolino](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@art.ardolino](https://meta.discourse.org/u/art.ardolino)
#### Post date: [April 22, 2020, 4:00pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/239 "2020-04-22T16:00:34Z")

</div>

Hello,

I just installed this package and restarted several times, but I do not see the option to enable ratings under category settings. Any idea what could be wrong? I checked the plugin settings and ratings are enabled there. I’m not using tagging right now - just want to turn this on for certain categories.

Thanks for your help.

---

<div class="post-metadata">

### Author: ![art.ardolino](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@art.ardolino](https://meta.discourse.org/u/art.ardolino)
#### Post date: [April 22, 2020, 4:03pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/240 "2020-04-22T16:03:31Z")

</div>

Nevermind, I found it. The setting appears under “Category Lockdown” which is a different plugin I have installed, which is why I didn’t see it (see image below). I guess this plugin doesn’t create its own header for controls under the settings tab.

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/d/adf119ac5255668ca56a7f9ce25e01430e270577.png)

---

<div class="post-metadata">

### Author: ![Bcat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bcat/32/163148_2.png) [@Bcat](https://meta.discourse.org/u/Bcat)
#### Post date: [May 7, 2020, 8:06am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/241 "2020-05-07T08:06:23Z")

</div>

```plaintext
<% if @topic_view.topic.average_rating != "" %>
<div itemscope itemtype="http://schema.org/CreativeWorkSeries">
  <span itemprop="name"><%= @topic_view.topic.title %></span>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue"><%= @topic_view.topic.average_rating %></span>
    <meta itemprop="bestRating" content="5"/>
    <span itemprop="ratingCount"><%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %></span>
  </div>
</div>
<% end %>

```

How to use `if @topic_view.topic.average_rating != ""` to show/hide this code?

* * *

**Solved**

```plaintext
<% if @topic_view.topic.average_rating && @topic_view.topic.posts.count %>
<div itemscope itemtype="http://schema.org/CreativeWorkSeries">
  <span itemprop="name"><%= @topic_view.topic.title %></span>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <span itemprop="ratingValue"><%= @topic_view.topic.average_rating %></span>
    <meta itemprop="bestRating" content="5"/> 
    <span itemprop="ratingCount"><%= @topic_view.topic.posts.count { |p| !!p.custom_fields['rating'] } %></span>
  </div>
</div>
<% end %>

```

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [June 1, 2020, 6:45am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/242 "2020-06-01T06:45:03Z")

</div>

OK, all users of Topic Ratings, please take note below.

# How to safely update when using our plugins:

### Pavilion’s update schedule

Topic Ratings is one of the Pavilion family of open source plugins.

Going forward, Pavilion will focus on ensuring compatibility of a core set of its plugins with Discourse Core `tests-passed` branch _during the first 5 days of every month_ only.

Any bugs which arise because of an incompatibility will be addressed asap during this ‘supported period’, preferably by the 7th day. Low severity or Beta feature bugs may not be addressed by this date, but obvious things which are ‘breaking’ a forum should be resolved.

_ **This new policy will come into effect 1st May 2020** _

### Why we are introducing this policy

We have no control over changes in Discourse core. That is how it should be. However, as our plugins have grown and become more sophisticated, it is getting more and more burdensome to guarantee they are working with every update of Discourse. It’s becoming untenable to ensure immediate compatibility is maintained.

To give our developers breathing room so they can attend to other priorities in addition to plugin support we will no longer be guaranteeing compatibility with Discourse every day of the month.

This policy should also help you achieve more stability and give you more certainty over when you can more safely update.

### How to perform your update

Aim to update your Production Discourse instance (both Discourse core _and_ our plugins) in the first 5 days of every month. Notify us on the relevant Plugin Topic on Meta of any issues you encounter. You will get more focussed support from the Pavilion team on any issues with their plugins during this period.

You update your Production server outside of the first 5 days of the month at your own risk. If you do so and something breaks related to one of our plugins, we urge you to report it and in addition, and if appropriate, uninstall our plugin until it is resolved. Unfortunately we may not get around to fixing it until the next supported period at the beginning of the following month.

### For even greater safety

Consider testing your update on your own staging server built from a back-up of your production site. This is especially important if your site is large, popular and/or part of a business.

You can switch this server off for the rest of the month so you don’t get charged for up-time. Use this opportunity to test out all basic functionality to identify any issues with plugins. Report all critical and high issues asap on the relevant plugin topic.

Using a staging site _may_ allow you to have more discretion over when you update, but be aware of the relative lack of support in the latter part of the month.

Thanks for your understanding!

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [June 12, 2020, 2:12pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/243 "2020-06-12T14:12:34Z")

</div>

I’m not sure if the bug has been reported.

You can rate more than one time (related to `can_rate`), if a topic is loaded and your post with the rating is not included in that initial load.

It will work (`can_rate` to `false`) once the post with rating is loaded.

It’s quite problematic. What you said as comment there might be the reason

> <https://github.com/paviliondev/discourse-ratings/blob/b0afbde2f76740b0ffe1e54ff4a65daabde82497/lib/ratings_helper.rb#L65>

Is it possible to fix please?

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [June 22, 2020, 10:01am UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/244 "2020-06-22T10:01:08Z")

</div>

Guys, we just pushed a new feature `Multiple Ratings` into master. Now you can rate a topic based on multiple criteria. Its a complete overhaul of the existing plugin. Please have a look at this guide for how to migrate your existing data to the new structure.

> **[Pavilion](https://pavilion.tech/)**
>
> Pavilion is the leading Discourse consultancy.

We suggest you take a backup before upgrading just to be extra careful.

We’ll look forward to your feedback.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [June 22, 2020, 12:01pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/245 "2020-06-22T12:01:05Z")

</div>

Thanks for reporting the issue. We have almost completely revamped the plugin. Could you on the latest version whether you get this issue or not?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [June 22, 2020, 2:09pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/246 "2020-06-22T14:09:39Z")

</div>

Is there some condition the checkbox to allow ratings to appear in the category settings?  
After upgrading, I can’t see it anymore.

It’s a Discourse for testing stuff, and there are currently ratings enabled on ‘Uncategorized’ category.  
Even though I can see the ratings, the option still doesn’t have appear in this category. Nor on a new category. All settings are enabled.

Also, another issue on Ratings tab. I removed the first category with `None` ; but it doesn’t seem possible to put it back. Also, not possible to Add `Uncategorized` with `None`.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [June 22, 2020, 2:17pm UTC](https://meta.discourse.org/t/topic-ratings-plugin/39578/247 "2020-06-22T14:17:17Z")

</div>

Yes you need to do a few things mentioned in the documention link above.

[Previous page](https://meta.discourse.org/t/topic-ratings-plugin/39578.md?page=11)

[Next page](https://meta.discourse.org/t/topic-ratings-plugin/39578.md?page=13)
