Question Answer Plugin

(Angus McLeod) #84

I’ve added a setting that allows you to set a seperate time limit for undoing votes: qa undo vote action window

  • If this setting is not set, the plugin will use the core undo time limit setting for all post actions as a fallback.

  • If it is set to 0, the user will always be able to change their vote.

This change is now live on my sandbox, where I’ve set the vote undo setting to 0:

This is quite possible to do, but as I’m trying to not do any new work on this plugin I have to draw the line somewhere I’m afraid.

I’m not done forever, but I won’t be doing serious work on it for a while (i.e. months). I will fix existing functionality if it breaks however.

I don’t take paid gigs (at the moment), but if you do decide you want to fund further development of this plugin, there are some good plugin authors here on meta that could handle it. You could post it in the #marketplace.

(Blu McCormick) #85

Wow, thank you, Angus! I like how in a growing discussion people can change their vote for the best answer so the posts bumped to the top are an even better concensus of what people want. I am not sure why we were barred from changing our vote hours after voting, but I’ll be sure to set the setting to zero.

Forgive me for my obtuseness, but do we download an update to get this setting?

P.S. I tried the sandbox. Can’t wait to try it in our forum. Thanks again.

(Angus McLeod) #86

No worries. To upgrade a plugin go to and click “Upgrade To the Latest Version” next to the plugin you want to upgrade (i.e. the Question Answer Plugin).

(Blu McCormick) #87

Thanks, Angus. implemented the upgrade. Works like a charm. So happy.

(Blu McCormick) #88

Hey @angus,

Here is some discussion that I thought you might be interested in:

(Mirko) #90


Not sure how to use this tag?

(Blu McCormick) #91

Wondering Miro if that tag is for when you haven’t enabled the plug-in for a particular category but you do want one topic in the category in question to have the question-and-answer toggle active? Betting it is something like that…?

(Angus McLeod) #92

Yup @McBlu is right. You can use that setting to create a QA topic outside of a QA category. e.g.

(Mirko) #93

Yes, it took me some time.

Made forum section with Q&A.

But in any section I could start as a Question if in tags add “question” .
Before that; first need to enable tags.


(Josh) #94

The string:

Enable QnA style for topics in this category.

should be “Make all topics in this category QnA”, since if a category has this checked, then you cannot make a topic “normal”, or am I missing something?

(Angus McLeod) #95

Yes, you’re right. Apologies for the confusion.

(Adrianbblk) #96

As a suggestion, I think an “I have the same question” button would be great.

Many users just reply to a question with.“I have the same question”, and that’s load a topic too much for no reason and sometimes it makes other users to not open it because are thinking the answer was already posted. Also posted on Discourse Solved (Accepted answer plugin)

(Angus McLeod) #97

What do you see as the distinction between a ‘I have the same question’ button and the like button?

(Adrianbblk) #98

I’m guessing that users think of the Like button what they are using it on Facebook. (Like anything). I already explained that I have a lot of replies like. “I have this question too, I’m looking for an answer too”. And so on. Even doesn’t matter what the like button means, but how users use. Please like things just because…

(Angus McLeod) #99

Sorry, maybe I should have been a bit clearer in my question.

Do you mean this is likely to happen, or are you using this plugin and finding that people are posting ‘I have this question too’ on QnA topics?

If it’s actually happening in topics with this plugin, then perhaps we need a solution for it. If not, then let’s see what happens in practice.

I recently added some updates to this plugin to make the QnA paradigm clearer. Perhaps they will help for this issue too (i.e. by making it clear that posts in the topics are either answers or comments on answers).

  • Answer-specifc and comment-specific reply buttons

  • QnA-specific topic map


We were building discourse with the Q&A plugin just fine a few weeks ago. But now we get this error:

rake aborted!
NoMethodError: undefined method is_category_topic?' for #<Topic:0x00559bd9efe488> /discourse-build/plugins/discourse-question-answer/lib/qa_helper.rb:5:inqa_enabled’
/discourse-build/plugins/discourse-question-answer/lib/qa_post_edits.rb:21:in `qa_enabled’

(Angus McLeod) #101

hm, I have not encountered this error when building my sandbox with the Q&A plugin.

Also is_category_topic? is a method of the Topic class in core Discourse, so I’m not sure why it would be undefined on what seems to be an instance of the Topic class.

Do you have any other third party plugins installed?

Does this only happen when running ./launcher rebuild app?

In any event, I’ve added a check that should handle your situation.


This is happening during a plugin install. We have other 3rd party plugins: poll, lazyYT, discourse-oauth, and a couple others.

I will try it again with your check. Thanks for the quick response. Will let you know how goes.


The fix worked! Thank you!

(Kinto D) #104

Is there anybody who got a problem after install this plugin?
After i checked production log in my server, it says

undefined method `vote_count' for #<Post:0x00007fe54c498548>

I’m using Discourse version v2.1.0.beta2 +194, and only installed official ads plugin with default docker manager plugin.