javilonas
Active member
Is it true for this error as well?
Discussion forum structured data issues detected
Top critical issues*
Either 'text', 'image' or 'video' should be specified
If yes, then the posts Google listed in my case don’t fall in any of the two situations
Please try using this code instead of the one in the first post. The initial code caused various issues such as duplicate URLs, missing "text", "image", or "video" fields, and even the "comment" field problem. Although this solution can be further refined and adapted with more data, I believe it at least resolves the issues reported in the Google search-console:
Code:
<xf:if is="$includeMicrodata">
<meta itemprop="parentItem" itemscope itemid="{{ link('canonical:threads', $thread) }}" />
<div itemprop="author" itemscope itemtype="https://schema.org/Person">
<meta itemprop="name" content="{{ $post.User.username ?: $post.username }}" />
<meta itemprop="text" content="{{ $post.message }}" />
<meta itemprop="url" content="{{ link('canonical:members', $post.User) }}" />
</div>
<xf:if is="$post.message">
<meta itemprop="comment" content="{{ $post.message }}" />
<meta itemprop="name" content="Post by {{ $post.User.username ?: $post.username }}" />
<meta itemprop="text" content="{{ $post.message }}" />
<div>
<span itemprop="text" content="{{ $post.message }}"></span>
</div>
</xf:if>
</xf:if>
At least in my case, this code has resolved all the errors, reducing the rest to simple warnings.
I hope it helps someone
