Google search console flagged a couple of my AMP pages with the error: Error in required structured data element

When I use the URL inspection tool, it says:

Linked AMP version is valid with warnings
Error in required structured data element

But in the HTML section of the crawled page, it says Sorry--no code highlighting available for this issue. I made sure to do a Live Test and not use code from Google's index.

However, when I run the same URL thrugh Google's Structured Data Testing Tool, it says there are 0 errors and 0 warnings. Additionally, when I add #development=1 to the end of the URL and use the Chrome DevTools console, it says AMP validation successful.

How can I find what the error is?

I want to add that all of the URLs with this issue are using the same template, and no valid URLs are using this template, so it's obvious this is not random.

I figured it out.

It's not a requirement of NewsArticle structured data, but AMP NewsArticles are required to include a big header image.

For anone curious, you can find all of the requirements here:

https://developers.google.com/search/docs/data-types/article

  • author
  • author.name
  • datePublished
  • headline
  • image
  • publisher
  • publisher.logo that follows very specific AMP logo guidelines
  • publisher.logo.url
  • publisher.name

Never mind, that ended up not being the problem :(

I have all the required components, all the required dimensions.

Can someone please help me figure out why pages such as this one are failing AMP verification:

https://www.daniweb.com/digital-media/ui-ux-design/op-ed/520339/which-one-to-opt-for-ui-or-ux-you-re-asking-the-wrong-question/amp

Google Search Console URL Inspection gives the error:

URL is available to Google, but has issues
If it gets indexed and selected as canonical, it could appear in Google Search results. However, some issues prevent it from being eligible for all enhancements. Learn more

Linked AMP version is valid with warnings
It is eligible for some AMP-specific features in Google Search results, but is not fully compliant with AMP best practices. Learn more

Error in required structured data element

All the other public AMP validators show no issues.

I figured out the reason for this but I never updated this thread.

It turns out that AMP news stories, tutorials, etc. require JSON-formatted structured data. Structured data embedded within the HTML tags doesn't count.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.