Andrea Afra
asked 9 years ago

Basically, if I want to show ‘Answered’ questions using the ‘Answered’ status filter, it doesn’t show Questions with ‘Answers’ – only Questions with comment replies to answers.

This isn’t very intuitive and not what the expected results should filter. It should show all Questions with answers submitted by the ‘Answer this question’ box (not comments/replies to answers)

If the Question only has ‘Answers’ and no comments, the search/filter results for status ‘Answered’ is empty

4 Answers
Andrea Afra
answered 9 years ago

I think I need to clarify this question…maybe I’m unclear about what is supposed to show when clicking ‘Answered’ in the status filter. I would guess it should show questions that have published answers, however I’m getting ‘nothing found’ as the result.

DominicStaff
answered 9 years ago

Hi,
Apologies for the delay in replying to you. I have checked on our demo and it’s bug came from DW Q&A plugin. Please send me username & password of your site (via private answer), we will check and fix it.
Regards,

psdcovers
replied 9 years ago

I am having the same issue on a staging server on an internal network. Is it possible to post the fix here so I can update our code? Is DW Q&A 1.3.4 going to fix this in the next update? When is the next update?

dominic Staff
replied 9 years ago

It’s difficult to let you know exactly when we totally update our plugin . Please stay tuned. We will check, fix bugs and update as soon as possible.
About your issue, Have you tried:
open Inc/filter.php go to Line 400
in case replied you add this :

$args['meta_query'][] = array(
     'key' => '_dwqa_status',
     'value' => array( 'answered' ),
     'compare' => 'IN',
     );
break;

Hope this helps !

psdcovers
replied 9 years ago

Thanks Dominic, I’m trying it now. The code in Github has the same issue (code is very different as well).

psdcovers
replied 9 years ago

Seems it is only returning questions answered by me. If a user with a subscriber role answers a question the the correct label "ANSWERED" appears in the row but when I filter for "Answered" it only returns the questions which user Admin answered. Is that correct?

Allen
answered 9 years ago

@andrea : hi , you can try this to fix this problem : open Inc/filter.php: go to Line 400

in case replied you add this :

$args['meta_query'][] = array(
     'key' => '_dwqa_status',
     'value' => array( 'answered' ),
     'compare' => 'IN',
     );
break;
postik
replied 9 years ago

@nobita, I add your code but when I filter the answered status only the first question that is answered is showing the others did not.

nobita
replied 9 years ago

can i have you site url to check , glad 🙂

Andrea Afra
answered 9 years ago

This worked beautifully! Thank you SOOOO much!

As we’re unable to create a child inc/filter.php, will DW be adding this to the next update? I’m making notes on what I need to keep up w/ on updates.

dominic Staff
replied 9 years ago

Of course! we will update this issue in the next version. We will release as soon as possible.

oyedwqa
replied 9 years ago

@andreaafra i have the same issue. So how you have fix your issue ? For me when i click "Answered" in filter bar, he give me 0 result. I have 3 questions answered

andrea afra
replied 9 years ago

I used @Nobita’s fix above:

@andrea : hi , you can try this to fix this problem : open Inc/filter.php: go to Line 400

in case replied you add this :

$args[‘meta_query’][] = array(
‘key’ => ‘_dwqa_status’,
‘value’ => array( ‘answered’ ),
‘compare’ => ‘IN’,
);
break;

Powered by DW Question & Answer Pro