Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Structured Data: All there - but not questions?

0 votes
asked May 14 in Q2A Core by q2apro

Just checked again my structured data report on https://www.google.com/webmasters/tools/structured-data?hl=en

As you can see the Items count for Question is 0 (!)

Also the QAPage counts 0.

Maybe we have a wrong tag here?

Q2A version: 1.8.0

1 Answer

0 votes
answered May 15 by Scott
selected May 15 by q2apro
Best answer

You need to check your theme against qa-theme-base.php. You've most likely overridden some functions where the parent function has now changed. For example the html() method now adds tags from $this->content['html_tags']

commented May 15 by q2apro
Thanks! I was overriding the function main(), and $extratags was missing, which removed the content['main_tags'] and thus the itemscope! I hope that fixes it. Let's see :)
commented May 15 by q2apro
I just compared one of my sites with one of stackoverflow:
1. https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fwww.mathelounge.de%2F543153%2Febene-koordinatendarstellung-flache-berechnen
2. https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F19431440%2Fwhy-can-i-not-use-this-as-a-lexical-variable-in-php-5-5-4

Stackoverflow is listing 6 answers, my site is listing 0 answers (but it has 2 answers)! ... Need to check this again.

Stackoverflow uses within the answer DIV the following scope:
<div id="answer-19432335" class="answer" data-answerid="19432335"  itemscope itemtype="http://schema.org/Answer">

Q2A uses (from my forum):
<div class="qa-a-list-item " id="a543157" itemprop="suggestedAnswer" itemscope="" itemtype="http://schema.org/Answer">
commented May 19 by q2apro
Fix seems to work! Question count showing up :) – But "Answer" in the single test link (comment above) does not show the answer.  @Scott: Same for your PokeBase: https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fpokemondb.net%2Fpokebase%2F4799%2Fwhat-is-a-good-moveset-for-lanturn - No answers in the test tool.