Fix Google discussion forum structured data schema. [Deleted]

MentaL

Well-known member
MentaL submitted a new resource:

Fix discussion forum structured data - structured data

Here is how I resolved the markup errors with googles latest update as mentioned here: https://xenforo.com/community/threads/markup-improvements-for-google.213088/

edit template: post_macros

find

HTML:
<xf:if is="$includeMicrodata">       
 <meta itemprop="parentItem" itemscope itemid="{{ link('canonical:threads', $thread) }}" />   
</xf:if>

replace with

HTML:
    <xf:if is="$includeMicrodata">
        <meta itemprop="parentItem"...

Read more about this resource...
 
Odd, it should be working. Maybe its something to do with your template. Unsure, but your welcome to share a solution if found.
Shouldn't there be a conditional, as if it's a guest post there won't be a member url.
 
Shouldn't there be a conditional, as if it's a guest post there won't be a member url.
That's what the core does already, which is what causes the warnings. The modifications from this resource should not be necessary, they will hide the warnings at the expense of producing invalid structured data.
 
That's what the core does already, which is what causes the warnings. The modifications from this resource should not be necessary, they will hide the warnings at the expense of producing invalid structured data.
You are welcome to remove if there are discrepancies.
 
I just want to provide some clarity, at least. You may get warnings in Search Console in two situations:
  • Posts which only contain an image, video, or other embedded content (because we filter BBCode out of the structured data representation)
  • Posts from guests (because they have no profile to link to)
The changes here will make those warnings go away. In the former case because the text for all posts will now contain BBCode, and in the latter case because all guest posts will now link to /members/. We already set the post URL and author name so those ones shouldn't be necessary.

If you're getting warnings or errors beyond those two situations, it would be due to a style customization or bug. We'll likely make changes to address the first warning by properly setting the image or video properties eventually, but the latter cannot be resolved reasonably as there's just no valid URL to link to.
 
Last edited:
That's what the core does already, which is what causes the warnings. The modifications from this resource should not be necessary, they will hide the warnings at the expense of producing invalid structured data.
I just want to provide some clarity, at least. You may get warnings in Search Console in two situations:
  • First posts which only contain an image, video, or other embedded content (because we filter BBCode out of the structured data representation)
  • Posts from guests (because they have no profile to link to)
The changes here will make those warnings go away. In the former case because the text for all posts will now contain BBCode, and in the latter case because all guest posts will now link to /members/. We already set the post URL and author name so those ones shouldn't be necessary.

If you're getting warnings or errors beyond those two situations, it would be due to a style customization or bug. We'll likely make changes to address the first warning by properly setting the image or video properties eventually, but the latter cannot be resolved reasonably as there's just no valid URL to link to.
Hmm.... good to know. I made the change and then rolled it back. Who knows? I don't think that the search console generating warnings may impede search results or indexing. Thanks for the heads up
 
Why does my resource icon not appear if you search Naver and Baidu, Google engine only shows the title, not the icon, is there a way to fix this?
 
I just want to provide some clarity, at least. You may get warnings in Search Console in two situations:
  • First posts which only contain an image, video, or other embedded content (because we filter BBCode out of the structured data representation)
  • Posts from guests (because they have no profile to link to)
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
 
It's been a while since I delved much into this, so my memory was fuzzy. It can be any post which only contains an image, video, or other embedded content, rather than only the first post. I have revised my previous post.

In any case, the overall assessment is the same. With this approach, rich snippets of those posts would render as BBCode text (eg. [IMG]https://example.org/image.jpg[/IMG]), which violates the structured data guidelines for content which only contains an image and does not provide a better search experience. Further, in can actually worsen the results for posts which do contain text as they would now also contain any BBCode.

If you care more about making the warnings go away for what is typically a tiny minority of posts (<0.4% of posts on this site) than conforming to the guidelines or providing a good search experience, more power to you.
 
Back
Top Bottom