Fixed Fix Q&A Schema Answers Counter

BT10

Active member
Affected version
2.2.3 Patch 1
So I recently notice that the Q&A Schema of XenForo is a bit different from the Q&A Schema from sites like StackOverflow.

Here's what I mean:

StackOverflow's question thread: https://stackoverflow.com/questions/743164/how-to-emulate-a-do-while-loop-in-python

This thread has a total of 16 replies = 16 answers listed.

stackanswers.png

Here's another example of Q&A markup on the Apple support forum: https://discussions.apple.com/thread/252077201

apple.png

XenForo Q&A markup does not behave this way. Instead, it only count the "Best Solution" as the answer, which I think is a bit misleading and does not do the thread its justice.

Example: https://xenforo.com/community/threads/mysql-strings-to-replace-characters.190675/

With the current markup format that XF is using, only the "Best Solution" is being counted for the total amount of answers.

xf.png

My request: would you guys be able to change the Q&A schema markup to count all replies within a question thread as answers? Also, having the "total answers" count being more than one should also help with CTR (Click-through-Rate).
 
I did a bit more research on this Q&A schema markup and it does indeed show that XF QA schema markup is different from what others are using.

This article has more info: https://www.schemaapp.com/tips/how-to-create-qa-page-schema-markup-for-top-answer-rich-result/

QAPage-schema-snap.webp

As you can see, the @type Answer should be assigned to every message under the initial question. This is missing from XF's schema markup.

Example from one of XF's question thread: https://xenforo.com/community/threads/email-to-post.190556/

As of writing this, there are two answers in there. However, checking the Rich Results Test, it's not showing those two answers :(

Hopefully, I was able to provide enough useful info for the dev team to look into this issue. Looking forward to the changes.
 
With the current markup format that XF is using, only the "Best Solution" is being counted for the total amount of answers.

Note that in the xenforo thread you gave as an example, right now no posts received any votes, including the one that is marked as answer. Maybe for Google to count answers, they have to have received at least a vote?
 
As you can see, the @type Answer should be assigned to every message under the initial question.
Counting all posts in a thread as answers is wrong - the vast majority of posts in a question thread are discussion, not answers.

A response != an answer.
 
@Brogan StackOverflow and Apple have their Q&A markup to count all posts in a question thread as answers. And I think that works just fine.

If you guys think that it is wrong to count all posts in a thread as answers, would it be possible to implement an option to enable the count of all posts as answers just for people like me who would prefer to have the schema markup that way? It would be super helpful.
 
It's not up to me - the developers make the decisions and will respond to this thread in due course.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.7).

Change log:
Use the number of replies in a question thread as the number of answers instead
There may be a delay before changes are rolled out to the XenForo Community.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.7).

Change log:

There may be a delay before changes are rolled out to the XenForo Community.
This bug that is marked as fixed in 2.2.7 seems to have re-appeared:

The thread currently has 4 replies, but the answerCount is 0.

This thread currently has 3 replies, two of them have an upvote score of 1 - yet answerCount is also 0

Counting all posts in a thread as answers is wrong - the vast majority of posts in a question thread are discussion, not answers.
Hmm ... but they are labelled as answers:
1636060481961.png
So either they are answers (and as such should be counted in the Schema.org data) - or they are not and thus they should not be labeled as answers.
Labeling/Counting replies as "answers" in thread lists but not in Schema.org data seems inconsistent to me.

The Schma.org type Question was inspired by Stack Overflow:
The Question/Answer types were based on the Stack Overflow API.

So if this type is used, IMHO the semantics used by Stack Overflow should be kept, eg. every reply that can be voted on is a possible answer.
 
Last edited:
Top Bottom