Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+2 votes
1.5k views
in Q2A Core by
reshown by
by
Strange, can't see any reason why that would be the case. I don't get any such errors on my site. Can you try disabling different plugins and see if that fixes it? Maybe a plugin is messing up the HTML somewhere.
by
@fahimalfarhan those are *different* errors to the one you posted. The question you posted does have answers but you still get an error.

2 Answers

+1 vote
by
selected by
 
Best answer

I looked into this more closely. The problem is that the second answer (by molla) has a bunch of messy HTML, in the answer itself. And it includes <div itemprop="text"> which is causing the duplicate.

You should be able to solve by editing the answer and removing the styles - if you're using the default WYSIWYG editor the "Tx" button will do that.

by
thank you bro. you are right. this problem is now solved
0 votes
by
edited by

https://www.nirbik.com/35145/

it this question you dont have content. The question just has title, no content. For users to write content by setting this:

admin => posting => Minimum length of question body: 12

And for duplicate suggestedAnswer issue do this. on app/format.php at line 326-333

make this changes:

if ($microdata) {
        if ($isanswer) {
                 $fields['tags'] .= ' itemprop="' . ($isselected ? 'acceptedAnswer' : 'suggestedAnswer') . '" itemscope itemtype="http://schema.org/Answer"';
        }
       if ($iscomment) {
            $fields['tags'] .= ' itemscope itemtype="http://schema.org/Comment"';
       }
}
 

by
Make above changes as I explained on app/format.php. It will be fixed.

For mainEntity problem, on my website https://gyzgyn.e-dostluk.com
it does not give error.
I realized that mainEntity is in qa-body-wrapper class. In my case, I have it on qa-q-view-content class.
by
you have two problems: warning of text and error of duplicate suggestedAnswer.

Did above modification in app/format.php not fix your suggestedAnswer problem?!

Try to clear cache. If it does not help, then your 'suggestedAnswer ' comes from somewhere else. You need to find that file.
by
on https://www.nirbik.com/512/
I see that itemprop has not been changed after modification.

Also for text warning problem you need add  itemprop="text" to the <div class="qa-main-wrapper"> on snowflat qa-theme.php. It should be like <div class="qa-main-wrapper" itemprop="text">
by
you must be doing something wrong. check my q2a demo website. Below think has multiple answers, and one of them is selected. My problem of mainEntity.text and suggestedAnswer are fixed with above methods.

https://www.e-dostluk.com/q2a-demo/1/test-test-test-test-test-test

https://search.google.com/structured-data/testing-tool/u/0/#url=https%3A%2F%2Fwww.e-dostluk.com%2Fq2a-demo%2F1%2Ftest-test-test-test-test-test

If your "text" warning still exists, on app/format at lines 421-423 change this
if ($microdata) {
            $fields['content'] = '<div itemprop="text">' . $fields['content'] . '</div>';
        }
by
Hello, any idea to fix my problem about maintity.text ?
by
How can I fix "missing field mainentity" ?
...