Fix Google discussion forum structured data schema. [Deleted]

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 ;)
 
This resource has been removed and is no longer available.

Code:
         <xf:if is="$includeMicrodata">
            <meta itemprop="parentItem" content="{{ link('canonical:threads', $thread) }}" />
            <div itemprop="author" itemscope itemtype="https://schema.org/Person">
            <meta itemprop="name" content="{{ $post.User.username ?: $post.username }}" />
            <meta itemprop="url" content="{{ link('canonical:members', $post.User) }}" />
            </div>
            <meta itemprop="text" content="{{ $post.message }}" />
            <meta itemprop="name" content="Post by {{ $post.User.username ?: $post.username }}" />
           </xf:if>
 
Last edited:
Yenxji, the instructions are in the first post of this thread and what to find, then replace it with the info javilonas posted above.
 
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 ;)
No more critical issue but 3 non-critical issue for each post:

Untitled.webp

Untitled2.webp



However this seems to work without any non critical errors:


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" 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="url" content="{{ link('canonical:members', $post.User) }}" />
    </div>
    <meta itemprop="text" content="{{ $post.message }}" />
    <meta itemprop="datePublished" content="{{ $post.PostDate|date('c') }}" />
</xf:if>
 
Last edited:
No more critical issue but 3 non-critical issue for each post:

View attachment 312760

View attachment 312761



However this seems to work without any non critical errors:


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" 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="url" content="{{ link('canonical:members', $post.User) }}" />
    </div>
    <meta itemprop="text" content="{{ $post.message }}" />
    <meta itemprop="datePublished" content="{{ $post.PostDate|date('c') }}" />
</xf:if>
Does the resources title and resources icon appear on the Naver, Baidu, Google, and Yandex search engines? I tried everything and it didn't work at all
 
Last edited:
I'm not sure what you mean, can you post a screenshot of what you expect to happen?
1729531915408.webp

1729532090208.webp


As you can see resources are redirected to mods URL, so Google Indexes can't check on my site resources, it's not showing up anymore, I submitted Google Indexes on 1 June 2024. I do not know why is still this happening and the problem
 
No more critical issue but 3 non-critical issue for each post:

View attachment 312760

View attachment 312761



However this seems to work without any non critical errors:


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" 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="url" content="{{ link('canonical:members', $post.User) }}" />
    </div>
    <meta itemprop="text" content="{{ $post.message }}" />
    <meta itemprop="datePublished" content="{{ $post.PostDate|date('c') }}" />
</xf:if>

The version I posted here was something basic that each person can adapt according to the errors they encounter in the Google console. In my case, all my final code is much more extensive than what I posted here, and it adapts to all kinds of situations, with images, without them, if the user no longer exists and doesn't have an associated ID because they come from a previous migration, if it's a comment, etc. In short, a more complex logic than what I showed here. That's why I said this resolves CRITICAL ERRORS, NOT WARNINGS.

I don't have any kind of warnings or critical errors, but I have obviously had to adapt as Google showed me issues while indexing my old content, which dates back from 2006 until today.

For that, you have to edit and add as needed, depending on the case. If that method worked for you, I'm glad it did for you ;)
 
No more critical issue but 3 non-critical issue for each post:

View attachment 312760

View attachment 312761



However this seems to work without any non critical errors:


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" 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="url" content="{{ link('canonical:members', $post.User) }}" />
    </div>
    <meta itemprop="text" content="{{ $post.message }}" />
    <meta itemprop="datePublished" content="{{ $post.PostDate|date('c') }}" />
</xf:if>
I tried this and got thousands of e_user_warning errors. Any idea what could be causing it?
 
I tried this and got thousands of e_user_warning errors. Any idea what could be causing it?
You can just delete this line:
Code:
<meta itemprop="datePublished" content="{{ $post.PostDate|date('c') }}" />
But
Even removing the whole if block validates fine for me now..
Code:
<xf:if is="$includeMicrodata">

this needs further testing.

EDIT: let me clarify PostDate should have been post_date, but even with the date in the proper format is giving errors so better leave it out altogether. In fact I think the whole block might be redundant.
 
You can just delete this line:
Code:
<meta itemprop="datePublished" content="{{ $post.PostDate|date('c') }}" />
But
Even removing the whole if block validates fine for me now..
Code:
<xf:if is="$includeMicrodata">

this needs further testing.

EDIT: let me clarify PostDate should have been post_date, but even with the date in the proper format is giving errors so better leave it out altogether. In fact I think the whole block might be redundant.
I deleted <meta itemprop="datePublished" content="{{ $post.PostDate|date('c') }}" /> and after testing some live links there appears to be no more errors in the admin panel nor in GSC. Thanks for the help!
 
Back
Top Bottom