Duplicate Google Error: Invalid object type for field "<parent_node>"

Alpha1

Well-known member
Licensed customer
Affected version
2.3.5
Invalid object type for field "<parent_node>"
Items with this issue are invalid. Invalid items are not eligible for Google Search's rich results

I have inspected the resources that Google lists and they all have a XFRM category they are in.
Its unclear to me why this error comes up.
 
Invalid object type for field "<parent_node>"
Items with this issue are invalid. Invalid items are not eligible for Google Search's rich results

I have inspected the resources that Google lists and they all have a XFRM category they are in.
Its unclear to me why this error comes up.
I’m seeing the same thing on my side and on xenforo.com as well. If you open any XenForo resource page with star ratings, you’ll see the same error. I noticed it in the google console today.
 
I temporarily did this in the template xfrm_resource_view

Code:
<xf:title>{{ prefix('resource', $resource, 'escaped') }}{$resource.title}</xf:title>

<xf:set var="$descSnippet" value="{{ snippet($description.message, 250, {'stripBbCode': true}) }}" />

<xf:macro id="metadata_macros::metadata"
    arg-description="{$descSnippet}"
    arg-shareUrl="{{ link('canonical:resources', $resource) }}"
    arg-canonicalUrl="{{ link('canonical:resources', $resource) }}" />

<xf:set var="$resourceUrl" value="{{ link('canonical:resources', $resource) }}" />
<xf:set var="$discussionUrl" value="{{ $resource.hasViewableDiscussion() ? link('canonical:threads', $resource.Discussion) : $resourceUrl }}" />
<xf:set var="$authorUrl" value="{{ $resource.User ? link('canonical:members', $resource.User) : $resourceUrl }}" />
<xf:set var="$authorName" value="{{ $resource.User ? $resource.User.username : $resource.username }}" />

<xf:set var="$descSnippet" value="{{ snippet($description.message, 5000, {'stripBbCode': true}) }}" />
<xf:set var="$currency" value="{{ $xf.options.currencyCode ?: 'EUR' }}" />


<xf:set var="$allReactions" value="0" />
<xf:if is="$description.reactions">
    <xf:foreach loop="$description.reactions" value="$cnt">
        <xf:set var="$allReactions" value="{{ $allReactions + $cnt }}" />
    </xf:foreach>
</xf:if>

<xf:page option="ldJsonHtml">
    <script type="application/ld+json">
    {
        "@context": "https://schema.org",
        "@type": "SoftwareApplication",
        "@id": "{{ $resourceUrl|escape('json') }}#app",

        "name": "{{ $resource.title|escape('json') }}",
        "description": "{{ $descSnippet|escape('json') }}",
        "url": "{{ $resourceUrl|escape('json') }}",
        "image": "{{ $resource.getIconUrl(true)|escape('json') }}",
        "applicationCategory": "{{ $resource.Category.title|escape('json') }}",
        "operatingSystem": "Windows 7, Windows 10, Windows 11",

        "datePublished": "{{ date($resource.resource_date, 'c')|escape('json') }}",
        "dateModified": "{{ date($resource.last_update, 'c')|escape('json') }}",
        "discussionUrl": "{{ $discussionUrl|escape('json') }}",

        "author": {
            "@type": "Person",
            "name": "{{ $authorName|escape('json') }}",
            "url": "{{ $authorUrl|escape('json') }}"
        },

        "publisher": {
            "@type": "Organization",
            "name": "{{ $xf.options.boardTitle|escape('json') }}"
        },

        "offers": {
            "@type": "Offer",
            "price": {{ $resource.price ?: 0 }},
            "priceCurrency": "{{ $currency|escape('json') }}"
        }

        <xf:if is="$allReactions > 0 OR $resource.view_count > 0">
        ,
        "interactionStatistic": [
            <xf:if is="$allReactions > 0">
            {
                "@type": "InteractionCounter",
                "interactionType": "https://schema.org/LikeAction",
                "userInteractionCount": {{ $allReactions }}
            }<xf:if is="$resource.view_count > 0">,</xf:if>
            </xf:if>
            <xf:if is="$resource.view_count > 0">
            {
                "@type": "InteractionCounter",
                "interactionType": "https://schema.org/ViewAction",
                "userInteractionCount": {{ $resource.view_count }}
            }
            </xf:if>
        ]
        </xf:if>

        <xf:if is="$resource.rating_count > 0">
        ,
        "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": {{ $resource.rating_avg }},
            "ratingCount": {{ $resource.rating_count }},
            "bestRating": 5,
            "worstRating": 1
        }
        </xf:if>
    }
    </script>
</xf:page>
 
Automated triage: Duplicate

Thank you for reporting this issue. This is the same problem as an earlier, still-open report. Resource pages with ratings mark the resource with a generic type that Google does not accept for review snippets, so any rated resource gets this error. It is being tracked in that earlier report.

Duplicate of: https://xenforo.com/community/threads/231861/

This is an automated assessment. A member of staff may review and update it.
 
Back
Top Bottom