Andrea Afra
asked 6 years ago

Steps to recreate problem:

  1. From all questions page, click sort by ‘answers’ – url now reads: url/?orderby=answers
  2. Click through on a question
  3. Hit your browser back button – url still reads: url/?orderby=answers

HOWEVER the results are now showing the normal blog posts instead of the DWQA list. WHYYY!? Help please!

3 Answers
Allen
answered 6 years ago

@andrea afra : Hi at this time , it’s our plugin bug, we’ll fix it in next version.

And you can fix this by open file inc\templates\default\assets\js\dwqa-questions-list.js go to line 214 and change the function if to :

 if (filter_plus != 'all' || category != 'all' || tags != 0 || type != 'all') {
        start_filter();
}

But, there’ll be a bug when you try to refresh the page it’ll always sort the answer by DESC, you can look at line 66 the code there is order = 'DESC',
We just forget to save the order after sorting so we make it default DESC , sorry for that inconvenience. We will fix this bug in next update. Glad.

Andrea Afra
answered 6 years ago

Thank you but this solution didn’t cause anything different to happen.

I’m really not sure if this is relevant, but one thing I noticed was that the category /question/ is in the url when you click to a single question, but when you go back in the browser, /question/ is missing from the url and it displays the regular WordPress posts (as DWQA are custom post types). Also, if I just use "url.com/question/" it displays the full list of questions.

nobita
replied 6 years ago

Oh sorry, i get it , my bad , i just found out a bug with answered filter thou.In My localhost i tested and it work find with this situation. So can you send me your site so i can check what cause it. Glad 🙂

Andrea Afra
answered 6 years ago

Any luck on this?

nobita
replied 6 years ago

@Andrea Afra: hi at this time you can fix it by open file dw-question-answer\inc\action.php go to line1405and add these code afterif(){}` :

else {
                    return;
                }

Glad.
P/s: i cant access your site with your account you gave.

nobita
replied 6 years ago

And about this bug , it happens when DWQA is home page.

andrea afra
replied 6 years ago

Thank you- trying your fix now!

andrea afra
replied 6 years ago

It worked! Thank you very much!!!

Powered by DW Question & Answer Pro