Closed topics still display votes

(Rob Meade) #1


I thought I read that once a topic was closed, the votes cast by users are returned to them.

Are there any exceptions to this? For example, if a topic was marked as “Solved” and then was automatically closed, could this leave votes behind?

The reason I ask is that we seem to have exactly that, topics which are closed, which have votes remaining and the only commonality that I can see at the moment is that these topics were marked as solved and subsequently automatically closed.

We have a hosted solution, so if links to the topics in question is of use, please let me know.

Any help would be appreciated.

(Régis Hanol) #2

Are you talking about a plugin? I’m not sure what you call “vote” :thinking:

(Rob Meade) #3


Thanks for the reply, yes, the discourse-voting plugin.

Each forum user gets a specific number of votes, until a topic is closed these are not returned to them. But it looks like if the topic is automatically closed, rather than manually, this doesn’t occur.


Erm, I did this image via my mobile and I had no idea how large that image was going to be - sorry - I wasn’t trying to be funny or anything, making it gigantic to emphasis the voting - no offence intended - only just spotted it after seeing your changed the subcategory! hugs! :slight_smile:

(Rob Meade) #4

Anyone have any thoughts on this one?

Perhaps I am mistaken, am I seeing a “history” of the vote final vote count and the people that voted on the topic, ref : Cannot view voters on a closed topic

I assumed the final count would clear when the votes were given back to the users.

(Sam Saffron) #5

Hmmm why should it clear? closing should just grant more votes imo.

(Rob Meade) #6

Hi Sam,

This wasnt behaviour I was asming for, I thought I read on Meta somewhere that omce a topic is closed that the votes are returned to the users.

After closing some.of our voted on topics recently I noted that the count remained, along with the avatars of those who had voted, thus I assumed that it hadnt returned the votes to the users (because they were still visible on the topics). This led me to sonder if it was then a combination of using the Solved feature and auto closing the topics which may have left the votes stuck.

(Republic Wireless) #7

This would be an issue for us as well. Let’s say we use Discourse to vote up proposed features. How would we denote that the idea is done (completed or otherwise closed)? How would the limited resource of votes be once again freed up to vote again after closure? Would the user need to know that they need to go remove their now irrelevant vote so they can vote again on another item that trips fancy?

(Rafael dos Santos Silva) #8

By closing the topic and posting that the feature is done.

It’s automatic, once you close the topic, all users who voted in the topic gain +1 vote.

They don’t need to, it’s all automatic. And we keep who voted for that feature, so you can check, do analytics, etc.

(Republic Wireless) #9

This is what I thought but I tested this in my new instance and it did not work. I hit the limit, then closed one of the topics and then had the test user try to vote on another topic and I was unable to.

I will do more testing today and report back.

(Rob Meade) #10

Just to check @Falco, if a topic is “Solved” using the Discourse Solved plugin, set to auto-close topics, would this produce the same behaviour, e.g. +1 for the user votes etc?

(Rafael dos Santos Silva) #11


The votes are returned in a background job, so maybe it was a timing issue?

If they aren’t back after several minutes it’s a big we must fix.

(Republic Wireless) #12

I am testing that anew. I will report back. As of now the Limit for my test user is 5 votes and he has 5 votes and one is closed and he is seeing:

The first time I click the Limit button I get:

Then if I “OK” that and then click it again I get:


I will give it an hour to run the job and then report back.

(Republic Wireless) #13

Still no awarded vote.

(Republic Wireless) #14

Still no awarded vote. Maybe I am testing it wrong but I do not see how.

(Republic Wireless) #15

Tried it again this morning and no vote was added to the user.

(Jeff Atwood) #16

I am not as familiar with this plugin maybe @sam can comment.

(Sam Saffron) #17

This code is meant to do it:

What it is supposed to do is “release” the votes when a topic is closed/autoclosed or archived.

This will shuffle a “vote” from the list of stuff a user voted for to an “archive” list per:

One big gap here is that there is no “regular” job that runs to normalize stuff, so if for any reason stuff gets out of sync nothing will correct it.

Can you PM me some examples of problem users so I can dig through the data model.