Wrong answerCount value from discourse-solved

The plugin set the value of the answerCount from Question schema.org to the number of replies of the topic. But according to google documentation the answerCount should be 0 is there is no acceptedAnswer or suggestedAnswer set.
I receive complains from Google Search Console for topics without accepted answer but with some replies.

2 Likes

This is new.

Maybe should use the suggestedAnswer with the answer that has got more “likes” :thinking: on topic when answerCount is > 0 and doesn’t have any answer with “solved” mark. :white_check_mark:

Check Google Strutured Data for example here.


I edit and explain my point.

In many debates, many situations are investigated and posed (which are answers) but do not constitute a solution to the subject in question.

Following the idea that commented @ced, a subject of 10 answers for example, some of those answers are valued with at least three “likes” should become “suggestedAnswer”.

2 Likes

I think I’m seeing the same issue, this just popped up on my search console today

Either “acceptedAnswer” or “suggestedAnswer” should be specified

So far it’s only showing up 1 page with the error

This post has 3 answers but no accepted/suggested answer.

We updated to 2.2.1 (self hosted) yesterday so I suspect that there will be more. We imported our old forums into discourse last year, so most (probably 99%) of the posts don’t have accepted answers.

1 Like

I am also have this problem with my site. Got a mail from google webmaster!!

1 Like

I think it should only be done if there is at least one like because sometimes reply to a question is a request for more information and not an answer. And if there are no likes on any replies, the answerCount should still be zero.

2 Likes

@vinothkannans can you add investigating this issue to your list?

4 Likes

This is fixed as per the below commit. Instead of topic reply count we should use only either 0 or 1 as answerCount.

No, we shouldn’t do it. It could be any non-answer post.

6 Likes

Great, with this fix the QApage disappear.

Thanks!

3 Likes

I hope this is correct. Until a solution is available Google not treating it as an QA Page.

2 Likes