Moving topics with votes to non-voting categories doesn’t release votes: A discussion about a potential bug in Discourse where moving a topic with votes to a category without voting enabled doesn’t return the votes to the users.
Karthikk_Vijay initially reported the issue and mentioned edge cases where closing a topic doesn’t automatically return votes. Simon confirmed the issue and suggested that removing votes from the topic when moved to a non-voting category could be an alternative solution, but noted potential issues with this approach.
Zup agreed that releasing votes after moving a topic to a non-voting category is necessary to avoid destroying the voting system. Simon mentioned the potential issue of losing votes if a topic is mistakenly recategorized.
Karthikk_Vijay suggested closing a topic before moving it to a category without the plugin as a best practice. However, Luke_Cousins reported that this issue still occurs, even after trying various steps.
Renato asked for reproducible steps to validate the issue, but Luke_Cousins was unable to reproduce the issue. Robinio reported that the issue still occurs on the latest version.
JammyDodger was unable to reproduce the issue on their test site, but Robinio later reported that the issue only affects old votes from topics moved before a fix, and apologized for the false report.
It appears that when a topic with votes is moved to another category, where voting is not enabled, the votes are not being returned to the owners. Is this a bug or an intended behaviour?
Additionally, there are edge cases where closing a topic doesn’t automatically return the votes to the user.
I’ve just tested this on my local development site and can confirm that votes are not being returned to the user when a topic is moved to a category that does not allow for votes. This doesn’t seem ideal to me, but I’m not sure if it’s the intended behaviour or not. The only alternative I can think of is that if a topic is moved to a category that does not allow voting, all votes should be removed from the topic. There would be potential issues with this approach as well.
If you know of any specific ways of reproducing the edge cases, let us know. I can look into this some more next week.
I’m also needing to release votes after moving a topic to a non-voting category. As it is, moving a topic with votes to a non-voting category risks destroying the voting system imo because the larger a database the more difficult/tedious it would be for moderators to manually ensure users don’t “lose” voting power. If 10 votes were allowed, and two topics I voted on got moved to a non-voting category without releasing their votes, I’d lose 20% of my global voting power.
The first one that came to mind was that if a topic was mistakenly recategorized (say by a TL3 user) all votes would be lost when it was put back to the correct category.
We’ve fixed some edge cases a couple of months ago, it’s possible that we’re still missing some scenario but it would be very helpful to have reproducible steps to validate the issue.
Are you seeing it in every moved topic? Or in any particular scenario you can share?
The topic that I noticed this on was created and moved on 17th April. Could it have been fixed since then? We install updated regularly, so rarely more than a week or so behind tests-passed.
I’ve just tried for a repro on my test site, and I couldn’t manage one. Moving a topic from a voting category to a non-voting category gave my test user their vote back.
Just to check I’m doing it right:
Enable topic voting in a category
Use test user to vote on a topic
As admin, recatgorise the topic to a non-voting category
As test user, vote on another topic and see how many votes you have left in the info in the pop up