Question Answer Plugin

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…?

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

1 Like

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.

Thanks…

1 Like

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?

1 Like

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

3 Likes

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)

2 Likes

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

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…

1 Like

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

3 Likes

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:in qa_enabled’
/discourse-build/plugins/discourse-question-answer/lib/qa_post_edits.rb:21:in `qa_enabled’

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!

1 Like

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.

Thanks

Perhaps this is due to this?

3 Likes

I’ve tried the plugin with code changes that removed “vote_count” attribute, and somehow it works.

But vote counter become “undefined”

I do not understand why the Post model has the vote_count attribute, even though Discourse doesn’t has a feature that votes on a post.

@kinto_d Yes, as @Stranik suggestions, it’s because vote_count was just removed from core.

@tgxworld What would you suggest as the best strategy to deal with existing use of vote_count by this plugin?

I would investigate it more closely myself, but I’m currently without a laptop.

1 Like

@angus A custom field would probably be the best option here. Do you store the votes somewhere?

They were being stored as vote post actions, i.e. in the vote_count column.

Would it be possible to delay the deletion of existing vote_count data? Everything else I can work around.