# Question Answer Plugin

**URL:** https://meta.discourse.org/t/question-answer-plugin/56032
**Category:** Plugin
**Tags:** deprecated
**Created:** [January 19, 2017, 4:43pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032 "2017-01-19T16:43:47Z")
**Posts on this page:** 18
**Page:** 15

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [December 30, 2021, 10:32pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/294 "2021-12-30T22:32:55Z")

</div>

So we had great success with one of our experiments:

> **[Music made with Bitwig - December 2021](https://bitwish.top/t/music-made-with-bitwig-december-2021/970)**
>
> This is an experiment discussed here. First time here? We are collecting music made with Bitwig and published this month. You can post new entries, listen, ❤ entries, upvote them, and (most importantly!) comment on them. If you have published...

Multiple entries, and several entries are getting additional comments. Interestingly, the upvoting itself hasn’t been used much, but maybe it is because this is a new idea and people are not used to it.

Now, one problem that we didn’t expect was that, with all this activity, it isn’t easy to find new comments, except for the very last (because it is the one being linked to from the timeline). Are we missing something, like a hidden alternative way to see the posts chronologically? Or any thoughts, advice?

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [January 30, 2022, 10:58pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/295 "2022-01-30T22:58:21Z")

</div>

Has anyone tried to create an SQL query to grant a badge to anyone who has submitted at least one answer that received at least one upvote on a specific category? Examples of queries with more answers and/or more upvotes would be very useful to create silver and gold types of badges around this great plugin. 🙂

---

<div class="post-metadata">

### Author: ![bdutta](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bdutta/32/259973_2.png) [@bdutta](https://meta.discourse.org/u/bdutta)
#### Post date: [May 20, 2022, 7:00am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/296 "2022-05-20T07:00:11Z")

</div>

Like many before me, been looking for a SO-like Q&A site that is based on a solid foundation, opensource, with an active & vibrant community, and Discourse seems to be a natural fit (nearly) with it’s plugins.

Then found mention of your plugin in another thread, and this looks really very promising reading some of the posts above. Wondering if there is a site that uses latest/nearly-latest Discourse with this plugin (and hopefully not much else) to get a feel of how this plugin works & feels ?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [May 23, 2022, 6:23am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/297 "2022-05-23T06:23:35Z")

</div>

Angus,

We need to figure out if we “retire” this and move it to #plugin:broken-plugin or if you would like to keep this as is and maintain long term.

The official Q&A plugin (which is inspired by much of this) is now ready for beta. So we need to figure out what to do with this plugin.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [May 23, 2022, 6:33am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/298 "2022-05-23T06:33:59Z")

</div>

We’ll retire this one. When the new one is released, you can move this to #plugin:broken-plugin and put a notice directing people to the new one. I’ll also update the repo readme.

If there’s a need for a migration script, I’ll be happy to write that, but only if there’s a need amongst existing users of this plugin (please let me know if that’s you).

---

<div class="post-metadata">

### Author: ![techAPJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/techapj/32/342990_2.png) [@techAPJ](https://meta.discourse.org/u/techAPJ)
#### Post date: [May 23, 2022, 8:06am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/299 "2022-05-23T08:06:52Z")

</div>

Hey Angus,

I just published a new topic for the official Discourse Question Answer plugin:

> [@Discourse Post Voting](https://meta.discourse.org/t/discourse-question-answer/227808):
>
> discourse2Summary Discourse Post Voting allows the creation of topics with votable posts.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Features To create a new topic with votable posts open the menu in the top left of the composer and select ‘Toggle Post Voting’: With the topic in Post Voting mode, there’s a filter to sort answers by votes or by activity. Here’s an example …

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 30, 2022, 6:10pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/300 "2022-09-30T18:10:03Z")

</div>

> [@angus](#):
>
> If there’s a need for a migration script, I’ll be happy to write that, but only if there’s a need amongst existing users of this plugin (please let me know if that’s you).

I have a customer that is going to need it.

> [@Is it possible to convert an existing topic into a Post Voting one?](https://meta.discourse.org/t/is-it-possible-to-convert-an-existing-topic-into-a-post-voting-one/272248/1):
>
> Is it possible to convert an existing topic to QA format topic?

~~Seemed to be interested.~~ No. I think they just mean an existing normal topic. I’m a bit surprised that this isn’t solved, or perhaps all I need to do is to install [Discourse Upvotes](https://meta.discourse.org/t/discourse-upvotes/227808) and it’ll just work?

I don’t see any rake tasks in the new plugin, and glancing at the migrations it doesn’t appear that there is any magic there, though I could be wrong on one or both counts.

EDIT: OOps. It does look like the first migration handles moving stuff to the new plugin right here. . . I’m running the upgrade now and will delete this when it works.

EDIT 2: Sigh. It didn’t work. It’s failing with ` "PG::InvalidParameterValue: ERROR: cannot extract elements from a scalar",`

> <https://github.com/discourse/discourse-post-voting/blob/main/db/migrate/20211020062413_create_question_answer_votes.rb#L13-L28>

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 30, 2022, 7:16pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/301 "2022-09-30T19:16:11Z")

</div>

Here’s the problem. A bunch of the post\_custom\_fields look like this:

```plaintext
  "\"[\\\"[{\\\\\\\"direction\\\\\\\":\\\\\\\"up\\\\\\\",\\\\\\\"action\\\\\\\":\\\\\\\"create\\\\\\\",\\\\\\\"user_id\\\\\\\":51,\\\\\\\"created_at\\\\\\\":\\\\\\\"2018-11-02T14:21:49.785+00:00\\\\\\\"}]\\\",{\\\"direction\\\":\\\"up\\\",\\\"action\\\":\\\"create\\\",\\\"user_id\\\":61,\\\"created_at\\\":\\\"2018-11-15T18:49:43.875+00:00\\\"}]\"",

```

rather than, maybe, this

```plaintext
 "[{\"direction\":\"up\",\"action\":\"create\",\"user_id\":6,\"created_at\":\"2018-07-18T16:37:42.446+00:00\"}]",

```

Some are worse:

```plaintext
 "\"[\\\"[\\\\\\\"[\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"[\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"[{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"direc
tion\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\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\\\\\\\\\\\\\\\\\\\\\\\\",{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"direction\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"up\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"action\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"create\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"user_id\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":21,\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"created_at\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"2018-11-15T18:41:52.440+00:00\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}]\\\\\\\\\\\\\\\",{\\\\\\\\\\\\\\\"direction\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"up\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"action\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"destroy\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\"user_id\\\\\\\\\\\\\\\":21,\\\\\\\\\\\\\\\"created_at\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\"2018-11-15T18:41:56.158+00:00\\\\\\\\\\\\\\\"}]\\\\\\\",{\\\\\\\"direction\\\\\\\":\\\\\\\"up\\\\\\\",\\\\\\\"action\\\\\\\":\\\\\\\"create\\\\\\\",\\\\\\\"user_id\\\\\\\":3,\\\\\\\"created_at\\\\\\\":\\\\\\\"2019-05-17T17:21:51.066+00:00\\\\\\\"}]\\\",{\\\"direction\\\":\\\"up\\\",\\\"action\\\":\\\"create\\\",\\\"user_id\\\":43,\\\"created_at\\\":\\\"2019-06-01T14:10:48.056+00:00\\\"}]\"",

```

So I guess I’d need to recursively try to un-quote these a bunch of times until it got back to the right way? I guess I’ll see if I can google the Ruby un-quotify function. . . .

It looks like a real mess:

```plaintext
[24] pry(main)> too.value.gsub(/\\+/,"\\").undump
=> "[\"[\"[\"[\"[\"[\"[{\"direction\":\"up\",\"action\":\"create\",\"user_id\":161,\"created_at\":\"2018-11-14T01:41:18.071+00:00\"}]\",{\"direction\":\"up\",\"action\":\"create\",\"user_id\":21,\"created_at\":\"2018-11-15T18:41:37.215+00:00\"}]\",{\"direction\":\"up\",\"action\":\"destroy\",\"user_id\":21,\"created_at\":\"2018-11-15T18:41:44.680+00:00\"}]\",{\"direction\":\"up\",\"action\":\"create\",\"user_id\":21,\"created_at\":\"2018-11-15T18:41:52.440+00:00\"}]\",{\"direction\":\"up\",\"action\":\"destroy\",\"user_id\":21,\"created_at\":\"2018-11-15T18:41:56.158+00:00\"}]\",{\"direction\":\"up\",\"action\":\"create\",\"user_id\":3,\"created_at\":\"2019-05-17T17:21:51.066+00:00\"}]\",{\"direction\":\"up\",\"action\":\"create\",\"user_id\":43,\"created_at\":\"2019-06-01T14:10:48.056+00:00\"}]"
[25] pry(main)> one.value.gsub(/\\+/,"\\").undump
=> "[\"[{\"direction\":\"up\",\"action\":\"create\",\"user_id\":134,\"created_at\":\"2019-02-11T19:33:22.533+00:00\"}]\",{\"direction\":\"up\",\"action\":\"create\",\"user_id\":213,\"created_at\":\"2019-02-28T15:12:07.776+00:00\"}]"

```

I can do

```plaintext
SELECT
    post_id,
    jsonb_array_elements(value::jsonb) AS value                                   
  FROM post_custom_fields WHERE name = 'vote_history'
 and value not like '\"[%';
discourse=> SELECT
    post_id,
    jsonb_array_elements(value::jsonb) AS value
  FROM post_custom_fields WHERE name = 'vote_history'
 and value not like '\"[%';

```

and get ~200 of ~250 entries, leaving a few that still look something like

```plaintext
    1865 | "[\"[\\\"[{\\\\\\\"direction\\\\\\\":\\\\\\\"up\\\\\\\",\\\\\\\"action\\\\\\\":\\\\\\\"create\\\\\\\",\\\\\\\"user_id\\\\\\\":161,\\\\\\\"created_at\\\\\\\":\\\\\\\"2019-06-28T15:39:44.438+00:00\\\\\\\"}]\\\",{\\\"direction\\\":\\\"up\\\",\\\"action\\\":\\\"create\\\",\\\"user_id\\\":39,\\\"created_at\\\":\\\"2019-07-03T19:29:04.663+00:00\\\"}]\",{\"direction\":\"up\",\"action\":\"create\",\"user_id\":298,\"created_at\":\"2019-07-11T13:51:52.447+00:00\"}]"

```

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [October 3, 2022, 8:48am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/302 "2022-10-03T08:48:20Z")

</div>

I’m not sure how you ended up with multi-escaped json, but I would go back to a backup prior to the attempted upgrade, fix any escaping issue in a targeted way and try again using the standard migration.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 3, 2022, 3:19pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/303 "2022-10-03T15:19:30Z")

</div>

> [@angus](#):
>
> I would go back to a backup prior to the attempted upgrade,

These issues go back years, so a backup isn’t a good solution. The good news is that they don’t seem to have used it much lately (like 3 times this year?), so perhaps I can just remove it.

Thanks.

The only potenially confusing thing is that it’s not clear from the documentation that I see that you can just switch to the new upvote plugin and it’ll “Just Work” (unless it doesn’t, but it looks like that’s not the fault of the most recent version of either plugin.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [October 6, 2022, 1:29pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/304 "2022-10-06T13:29:46Z")

</div>

As mentioned in the other topic, essentially you’re experiencing an issue with a migration in the Upvotes Plugin. The ultimate solution here is for that migration to handle edge cases that can arise with Discourse custom fields when used at scale.

> [@Plugin causing errors during rebuild](https://meta.discourse.org/t/plugin-causing-errors-during-rebuild/241110/23):
>
> @Jaap-Jan_Swijnenburg I’m sorry you’ve experienced an issue. I’ll respectfully disagree with you there slight_smile The old QnA plugin used [standard Discourse custom field type casting](https://github.com/paviliondev/discourse-question-answer/blob/master/plugin.rb#L85), which is meant to handle casting that field to JSON. But that just doesn’t work in some cases (like this one), which is why you (ideally) need to build in format checks when you’re working with Discourse custom fields (particularly if you’re working with quite old code and data like this). I would suggest th…

---

<div class="post-metadata">

### Author: ![sam4](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam4/32/273073_2.png) [@sam4](https://meta.discourse.org/u/sam4)
#### Post date: [November 4, 2022, 1:12pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/305 "2022-11-04T13:12:22Z")

</div>

I’m trying to count the total amount of upvotes/downvotes in a topic in [Data Explorer](https://meta.discourse.org/t/32566?silent=true). Has anyone found the data identifier for upvotes/downvotes to input into the [Data Explorer](https://meta.discourse.org/t/32566?silent=true)?

---

<div class="post-metadata">

### Author: ![Mr.X\_Mr.X](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mr.x_mr.x/32/126610_2.png) [@Mr.X\_Mr.X](https://meta.discourse.org/u/Mr.X_Mr.X)
#### Post date: [December 8, 2022, 6:47pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/306 "2022-12-08T18:47:47Z")

</div>

This plug-in is broken as of last discourse update. Some js errors that break the message listings inside topics.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [December 8, 2022, 7:00pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/307 "2022-12-08T19:00:11Z")

</div>

Thanks for the report. 👍 I’ll swop the tag out.

---

<div class="post-metadata">

### Author: ![hoangphuctran93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hoangphuctran93/32/290976_2.png) [@hoangphuctran93](https://meta.discourse.org/u/hoangphuctran93)
#### Post date: [January 18, 2023, 1:08am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/308 "2023-01-18T01:08:26Z")

</div>

Awesome, thank you for creating this plugin, it’s exactly what i was looking for for my new project. A site that showcases information and allows members to rate them.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [January 18, 2023, 5:20am UTC](https://meta.discourse.org/t/question-answer-plugin/56032/309 "2023-01-18T05:20:26Z")

</div>

Since this plugin is tagged as #broken I recomment using [Discourse Post Voting](https://meta.discourse.org/t/discourse-question-answer/227808)

---

<div class="post-metadata">

### Author: ![FranklinYu](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/franklinyu/32/142466_2.png) [@FranklinYu](https://meta.discourse.org/u/FranklinYu)
#### Post date: [May 28, 2023, 8:24pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/310 "2023-05-28T20:24:03Z")

</div>

That plugin “is still in active development and may change frequently”. This reminds me of [the famous meme in Google](https://goomics.net/50/):

 ![meme about deprecation](https://global.discourse-cdn.com/meta/original/4X/0/1/8/01810509e3756a7365be405b8937890da962d7cc.png)

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 18, 2024, 3:24pm UTC](https://meta.discourse.org/t/question-answer-plugin/56032/311 "2024-06-18T15:24:59Z")

</div>



[Previous page](https://meta.discourse.org/t/question-answer-plugin/56032.md?page=14)
