Wrong answerCount value from discourse-solved


(CĂ©dric Krier) #1

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.


Support schema.org QAPage and Google rich results
#2

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”.


(Vincent) #3

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

https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fwww.finalbuilder.com%2Fforums%2Ft%2Fediting-jira-issues%2F6254

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.


(Praveen Kumar P S) #4

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


(CĂ©dric Krier) #5

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.


(Sam Saffron) #6

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


(Vinoth Kannan) #7

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.


#8

Great, with this fix the QApage disappear.

Thanks!


(Vinoth Kannan) #9

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