AMP pages with VideoObject returning 'Error in required structured data element' in Google Search Console

Viewed 313

Summary

We have a canonical version of a website, and an AMP version of a website. The structured data on the canonical version matches the structured data on the AMP version.

Google Search Console says all pages are valid on both the canonical and AMP versions of the site, except for two AMP pages.

Two AMP pages are showing a warning which says: "Error in required structured data element".

When we test these pages in Google's Structured Data Testing Tool, they do not show an error.

The two AMP pages that are affected are also the only two AMP pages which have embedded video (via Vimeo) and contain additional VideoObject mark-up related to that video.

The exact same embedded video and mark-up is present on the canonical (non-AMP) versions of the pages, but is not producing this error.

What we've tried

A similar issue is marked as solved on the official AMP Project git repository: https://github.com/ampproject/amphtml/issues/18227

That issue related to an Article object which was showing the same error in search console, and similarly not showing an error in the structured data testing tool.

There was a problem with the structured data in that case, and although the testing tool did not produce an error, the absence of the green 'preview' button there indicated that something was wrong.

When implemented as an independent property, VideoObject does not produce a 'preview' button. As a possible solution, we have tried to nest the VideoObject property within our general 'AutomotiveBusiness' property. This does produce a green 'preview' button, but does not resolve the search console error.

Our code

Our structured data is as follows:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "AutomotiveBusiness",
  "@id": "https://www.example.com",
  "url": "https://www.example.com",
  "name": "example.com",
  "sameAs": [
    "https://www.facebook.com/example/",
    "https://twitter.com/example/"
  ],
  "priceRange": "$-$$",
  "logo": "https://amp.example.com/assets/media/logo.png",
  "image": "https://amp.example.com/assets/media/feature.jpg",
  "telephone": "+1 888-888-8888",
  "email": "help@example.com",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "1234 ABC Ln Suite 1",
    "addressLocality": "Beverly Hills",
    "addressRegion": "CA",
    "postalCode": "90210",
    "addressCountry": "US"
  },
  "areaServed": {
    "@type": "Country",
    "name": "United States",
    "sameAs": "https://en.wikipedia.org/wiki/United_States"
  },
  "openingHoursSpecification": {
    "@type": "OpeningHoursSpecification",
    "dayOfWeek": [
      "Monday",
      "Tuesday",
      "Wednesday",
      "Thursday",
      "Friday",
      "Saturday",
      "Sunday"
    ],
    "opens": "00:00:00",
    "closes": "23:59:59"
  },
  "paymentAccepted": [
    "Credit Card",
    "Debit Card"
  ],
  "makesOffer": {
    "@type": "Offer",
    "itemOffered": {
      "@type": "Service",
      "name": "Tire Change",
      "mainEntityOfPage": {
        "@type": "WebPage",
        "url": "https://amp.example.com/services/tire-change/index.html",
        "video": {
          "@type": "VideoObject",
          "name": "How to change a tire",
          "description": "Learn how to change a flat tire",
          "thumbnailUrl": "https://amp.example.com/assets/media/thumbnail.jpg",
          "embedUrl": "https://vimeo.com/51768781",
          "uploadDate": "Thu, 13 Jun 2019 10:31:57 -0400"
        }

      },
      "description": "We offer a 24/7 flat tire change service"
    },
    "areaServed": {
      "@type": "Country",
      "name": "United States",
      "sameAs": "https://en.wikipedia.org/wiki/United_States"
    }
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "5",
    "ratingCount": "3"
  },
  "review": [

    {
      "@type": "Review",
      "author": {
        "@type": "Person",
        "name": "John Smith"
      },
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5",
        "bestRating": "5",
        "worstRating": "1"
      },
      "name": "A really great review",
      "reviewBody": "A really great review"
    },

    {
      "@type": "Review",
      "author": {
        "@type": "Person",
        "name": "Jane Doe"
      },
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5",
        "bestRating": "5",
        "worstRating": "1"
      },
      "name": "Another great review",
      "reviewBody": "Another great review"
    },

    {
      "@type": "Review",
      "author": {
        "@type": "Person",
        "name": "J. Citizen"
      },
      "reviewRating": {
        "@type": "Rating",
        "ratingValue": "5",
        "bestRating": "5",
        "worstRating": "1"
      },
      "name": "The best review",
      "reviewBody": "The best review"
    }

  ]
}
</script>

Results

We expect the AMP pages with the above code to appear as valid in Google Search Console.

Google Search Console is instead showing the pages as invalid, with the warning, "Error in required structured data element".

0 Answers
Related