Topic Ratings Plugin

Thank you
I like rating-plugin

hey Angus. Just tried this by adding to app.yml and breaks the rebuild when I use the launcher. Is this added thru the admin settings or some other issue?

Anyone know how to get this done right? I’ve tried adding the whole section.

hooks: after_code: - exec: cd: $home/plugins cmd: - mkdir -p plugins - git clone https://github.com/angusmcleod/discourse-ratings.git

I tried adding just this

- mkdir -p plugins - git clone https://github.com/angusmcleod/discourse-ratings.git

I’ve tried just the normal way of -git clone https://github.com/angusmcleod/discourse-ratings.git

No matter what I do it doesn’t allow the launcher to rebuild the app.

This is yaml syntax and it doesn’t allow tabs to begin with. There may be other issues but make sure you’re using spaces and not tabs for indents.

Thanks. I copied and pasted it from the github so maybe that’s the reason. Should it be the full section added or just the git clone part?

Check this out.

1 Like

Yeah that’s just the standard. I tried that. Where I’m guessing my issue is with the -mkdir -p plugins line.

Yes. you don’t need to do that.

Ok so heres the error i get

I, [2019-08-27T09:33:32.898647 #20]  INFO -- : 
I, [2019-08-27T09:33:32.898807 #20]  INFO -- : > cd /var/www/discourse/plugins && git clone https://github.com/angusmcleod/discourse-ratings.git
Cloning into 'discourse-ratings'...
I, [2019-08-27T09:33:35.337452 #20]  INFO -- : 
I, [2019-08-27T09:33:35.337768 #20]  INFO -- : > cp /var/www/discourse/config/nginx.sample.conf /etc/nginx/conf.d/discourse.conf
I, [2019-08-27T09:33:35.341827 #20]  INFO -- : 
I, [2019-08-27T09:33:35.342189 #20]  INFO -- : > rm /etc/nginx/sites-enabled/default
I, [2019-08-27T09:33:35.344659 #20]  INFO -- : 
I, [2019-08-27T09:33:35.344783 #20]  INFO -- : > mkdir -p /var/nginx/cache
I, [2019-08-27T09:33:35.347471 #20]  INFO -- : 
I, [2019-08-27T09:33:35.348471 #20]  INFO -- : Replacing pid /run/nginx.pid; with daemon off; in /etc/nginx/nginx.conf
I, [2019-08-27T09:33:35.348857 #20]  INFO -- : Replacing (?m-ix:upstream[^\}]+\}) with upstream discourse { server 127.0.0.1:3000; } in /etc/nginx/conf.d/discourse.conf
I, [2019-08-27T09:33:35.349118 #20]  INFO -- : Replacing (?-mix:server_name.+$) with server_name _ ; in /etc/nginx/conf.d/discourse.conf
I, [2019-08-27T09:33:35.349463 #20]  INFO -- : Replacing (?-mix:client_max_body_size.+$) with client_max_body_size $upload_size ; in /etc/nginx/conf.d/discourse.conf
I, [2019-08-27T09:33:35.349744 #20]  INFO -- : > echo "done configuring web"
I, [2019-08-27T09:33:35.352366 #20]  INFO -- : done configuring web

I, [2019-08-27T09:33:35.352807 #20]  INFO -- : > cd /var/www/discourse && gem update bundler
I, [2019-08-27T09:33:40.884054 #20]  INFO -- : Updating installed gems
Nothing to update

I, [2019-08-27T09:33:40.884237 #20]  INFO -- : > cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+
chown: cannot dereference '/var/www/discourse/plugins/discourse-ratings/discourse-ratings': No such file or directory
I, [2019-08-27T09:33:42.396049 #20]  INFO -- : 
I, [2019-08-27T09:33:42.396498 #20]  INFO -- : Terminating async processes
I, [2019-08-27T09:33:42.396661 #20]  INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main pid: 74
I, [2019-08-27T09:33:42.396733 #20]  INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 191
191:signal-handler (1566898422) Received SIGTERM scheduling shutdown...
2019-08-27 09:33:42.397 UTC [74] LOG:  received fast shutdown request
2019-08-27 09:33:42.418 UTC [74] LOG:  aborting any active transactions
2019-08-27 09:33:42.424 UTC [74] LOG:  worker process: logical replication launcher (PID 83) exited with exit code 1
2019-08-27 09:33:42.424 UTC [78] LOG:  shutting down
2019-08-27 09:33:42.440 UTC [74] LOG:  database system is shut down
191:M 27 Aug 2019 09:33:42.447 # User requested shutdown...
191:M 27 Aug 2019 09:33:42.447 * Saving the final RDB snapshot before exiting.
191:M 27 Aug 2019 09:33:42.880 * DB saved on disk
191:M 27 Aug 2019 09:33:42.880 # Redis is now ready to exit, bye bye...


FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && find /var/www/discourse ! -user discourse -exec chown discourse {} \+ failed with return #<Process::Status: pid 360 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem update bundler", "find $home ! -user discourse -exec chown discourse {} \\+"]}
94c90ca9425cc301a5b050a68e890c937c9a70c79197f7afeec1ef1cc6ff06d9
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
1 Like

@angus I think its related to the plugin. I can repro that.

2 Likes

@Garrick Sorry for the slow response here. I just pushed a fix. I also moved the repository, so before rebuilding again, please update the link to

https://github.com/paviliondev/discourse-ratings.git

The old link will still work, but better to have the actual one. Let me know how that goes.

4 Likes

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

1 Like

These buttons are disappearing when activating the plugin:

image

My app.yml
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/paviliondev/discourse-ratings.git

Just installed discourse yesterday

Sir , I have installed 2.4.0.beta4 vesion of Discourse. I have installed two plugins discourse-rating (https://github.com/paviliondev/discourse-ratings) and discourse-topic-preview (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

Hey, @Mahesh_Tirthakar Please file a full bug report here: Bug Report

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

./launcher rebuild app

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

2 Likes

Rating Shows before the Username in Mobile view
image

How to sort the topics in home page by rating?

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

2 Likes