Structured Data Warnings in Rich Results Test

Rich Results Test shows your JSON-LD has warnings or invalid fields.

You paste your URL into Google’s Rich Results Test and the page lights up with yellow warnings: “Missing field ‘image’”, “Missing field ‘datePublished’”, “The value ‘string’ is not a valid date.” Search Console’s Enhancement reports show the same. Your rich snippets — star ratings, FAQ accordions, breadcrumbs — aren’t appearing in SERPs. The fix is straightforward: JSON-LD must match schema.org exactly. Rich Results Test is the source of truth. Every warning has a specific corrective action.

This guide goes through the most common warning categories and what each means in practice.

Common causes

Ordered by hit rate, highest first.

1. Missing required field

Each schema type has required fields. Article requires headline, image, datePublished, author. Miss any one and Rich Results Test flags “Missing field.”

How to spot it: Rich Results Test → expand the JSON-LD block → look for red “Missing field” lines.

Most common misses:

SchemaRequired field often missed
Articleimage, author.name, datePublished
FAQPagemainEntity[].acceptedAnswer.text
BreadcrumbListitemListElement[].position, item.@id
Productimage, offers.price, offers.priceCurrency
Recipeimage, recipeIngredient, recipeInstructions

2. Wrong data type

Field expects a date, you gave a string. Field expects a URL, you gave a path. Field expects a Person object, you gave a name string.

Example:

"datePublished": "May 2026"    // wrong: not ISO 8601
"datePublished": "2026-05-17"  // correct
"author": "Liziang Zheng"               // wrong: bare string
"author": { "@type": "Person", "name": "Liziang Zheng" }  // correct

3. Wrong schema type for the content

Marking a tutorial as Product (so it shows star ratings) or a list of links as FAQPage. Google detects and demotes.

How to spot it: Read Google’s schema reference for your content type. If your @type doesn’t match the actual content, change it.

4. Multiple JSON-LD blocks conflict

You have two <script type="application/ld+json"> blocks on the page — one says Article, another says BlogPosting, or two declare different @id. Google reads all blocks and warnings fire on inconsistencies.

How to spot it:

curl -s "https://yoursite.com/article" | grep -c '<script type="application/ld+json">'

1 = multiple blocks. Consolidate into one (use @graph if multiple types needed).

5. URL fields are relative

"image": "/og-cover.png" — Google needs absolute URLs. Should be "https://yoursite.com/og-cover.png".

6. Field exceeds character limits

Some fields have implicit limits: description should be < 5000 chars, headline < 110, name < 75. Exceeding triggers warnings.

7. JSON syntax error

A trailing comma, unescaped quote, or wrong bracket type. Rich Results Test reports “Cannot parse content as JSON.”

How to spot it: Copy the JSON-LD block into a JSON validator like jsonlint.com.

Shortest path to fix

Step 1: Test the affected URL

Open Rich Results Test → enter the URL → expand any warnings.

For each warning, note:

  • Which JSON-LD block (line range)
  • Which field
  • Expected type vs. provided value

Step 2: Generate a correct baseline

Don’t hand-write JSON-LD. Use a generator:

For an Article page:

{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "Title of the article",
  "image": ["https://yoursite.com/og-cover.png"],
  "datePublished": "2026-05-17T00:00:00Z",
  "dateModified": "2026-05-22T00:00:00Z",
  "author": {
    "@type": "Person",
    "name": "Author Name",
    "url": "https://yoursite.com/about"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Site Name",
    "logo": {
      "@type": "ImageObject",
      "url": "https://yoursite.com/logo.png"
    }
  },
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://yoursite.com/article"
  }
}

Step 3: For multi-type, use @graph

If you legitimately need Article + FAQPage on one page:

{
  "@context": "https://schema.org",
  "@graph": [
    { "@type": "Article", "@id": "https://yoursite.com/article#article", "..." },
    { "@type": "FAQPage", "@id": "https://yoursite.com/article#faq", "..." }
  ]
}

One <script> block, two types, no conflict.

Step 4: Fix at the template level

Don’t fix per article. Find your layout’s JSON-LD generator and fix the bug once. For Astro:

---
const { article } = Astro.props;
const jsonLd = {
  "@context": "https://schema.org",
  "@type": "Article",
  headline: article.title,
  image: [new URL(article.image, Astro.site).toString()],
  datePublished: new Date(article.publishedAt).toISOString(),
  // ...
};
---
<script type="application/ld+json" set:html={JSON.stringify(jsonLd)}></script>

Step 5: Validate in CI

// scripts/check-json-ld.mjs
import fs from 'node:fs';
import path from 'node:path';

const required = {
  Article: ['headline', 'image', 'datePublished', 'author'],
  FAQPage: ['mainEntity'],
  // ...
};

function walk(dir) {
  for (const f of fs.readdirSync(dir)) {
    const p = path.join(dir, f);
    if (fs.statSync(p).isDirectory()) walk(p);
    else if (p.endsWith('.html')) {
      const html = fs.readFileSync(p, 'utf8');
      const matches = html.match(/<script type="application\/ld\+json">([\s\S]+?)<\/script>/g) || [];
      for (const m of matches) {
        const json = JSON.parse(m.replace(/<\/?script[^>]*>/g, ''));
        const type = json['@type'];
        for (const field of (required[type] || [])) {
          if (!json[field]) console.error(`MISSING ${field} in ${type} at ${p}`);
        }
      }
    }
  }
}

walk('dist');

Step 6: Re-test and submit

After deploy:

  1. Re-run Rich Results Test → all green.
  2. Search Console → URL Inspection → Request indexing.
  3. Wait 7-14 days for Search Console Enhancement reports to update.

Prevention

  • Use a JSON-LD generator from a template, never hand-write.
  • One <script type="application/ld+json"> block per page (use @graph for multiple types).
  • Use ISO 8601 for dates: 2026-05-17T00:00:00Z. Never “May 2026” or “5/17/2026”.
  • Absolute URLs only in JSON-LD.
  • CI check that runs Rich Results Test API on sample URLs after deploy.

Tags: #Troubleshooting #SEO #Debug #Structured data #Rich results