Question Answer Plugin

Hey guys, @mbcahyono will respond in more detail soon, but in the meantime, can we clarify a few things.

@sunjam Did you see that issue after deleting the category? Also, did you just notice that issue in the logs or did it affect your site in any way?

@dfriestedt @AJDurant Please check if you have the plugin enabled in the category where the posts are appearing in a different order. The plugin will automatically order posts according to the QA order in categories where it is enabled (that is the intended behaviour). If you disable it in a category it will reorder the posts according to the normal post order.

For example, I just toggled the “Make all topics in this category QnA.” setting back and forth in the question and answer category on try.thepavilion.io and the posts re-ordered as expected (and no non-qa category topics affected). No custom queries involved.

When enabled

When disabled

If that’s not working for you, could also give us some more detail on

  • How long you’ve been using the plugin for (i.e. did this just happen recently?)
  • What other 3rd party plugins have you been using now or in the past
  • What custom sort queries you’ve been using?
  • Does your site use tags? If so does this only happen in topics with a tag?
  • Is the site setting qa enabled enabled?

If you just want to fix it

If you just want to fix the issue, regardless of whether this plugin has caused it or not, you don’t need to run a custom query, rather remove this and any other plugins that might be changing your sort order, then in your server run the following

./launcher enter app
rake posts:reorder_posts

That task will set the order of all posts on your site according to the normal order (when they were created). If that does not work for you, you have some other issue that is unrelated to this plugin. I can help you diagnose that further, but will need some more information.

@dfriestedt if you’re trying to pass a topic id in there (the task takes a topic id as an argument if you want to target a specific topic), try running it like this instead:

rake "posts:reorder_posts[1234]"
1 Like